mirror of
https://github.com/mpv-player/mpv
synced 2025-02-28 11:20:56 +00:00
demux_real: set aspect ratio
RM demuxer: set aspect from container video dimensions. Fixes the sample from FFmpeg trac issue #785. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34850 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
This commit is contained in:
parent
12bab01104
commit
62df332dd5
@ -1517,6 +1517,8 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
|
||||
sh->bih->biSize = sizeof(*sh->bih);
|
||||
sh->disp_w = sh->bih->biWidth = stream_read_word(demuxer->stream);
|
||||
sh->disp_h = sh->bih->biHeight = stream_read_word(demuxer->stream);
|
||||
if (sh->disp_w > 0 && sh->disp_h > 0)
|
||||
sh->aspect = (float)sh->disp_w / sh->disp_h;
|
||||
sh->bih->biPlanes = 1;
|
||||
sh->bih->biBitCount = 24;
|
||||
sh->bih->biCompression = sh->format;
|
||||
|
Loading…
Reference in New Issue
Block a user