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:
mplayer-svn 2012-04-09 11:25:57 +00:00 committed by wm4
parent 12bab01104
commit 62df332dd5
1 changed files with 2 additions and 0 deletions

View File

@ -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;