Commit bcb1b37d authored by Felix Paul Kühne's avatar Felix Paul Kühne

windowless-base: cache and expose original video dimensions

parent eb54e582
......@@ -35,6 +35,8 @@ unsigned VlcWindowlessBase::video_format_cb(char *chroma,
unsigned *pitches, unsigned *lines)
{
if ( p_browser ) {
m_media_source_width = *width;
m_media_source_height = *height;
float src_aspect = (float)(*width) / (*height);
float dst_aspect = (float)npwindow.width/npwindow.height;
if ( src_aspect > dst_aspect ) {
......
......@@ -80,6 +80,8 @@ public:
protected:
std::vector<char> m_frame_buf;
unsigned int m_media_width;
unsigned int m_media_source_width;
unsigned int m_media_height;
unsigned int m_media_source_height;
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment