Skip to content
Snippets Groups Projects
Commit bcb1b37d authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

windowless-base: cache and expose original video dimensions

parent eb54e582
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment