diff options
author | mplayer-svn <svn@mplayerhq.hu> | 2012-04-09 11:25:57 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-03 02:21:17 +0200 |
commit | 62df332dd5571b27f839a2280aee48268142394f (patch) | |
tree | d230fc00caaacb30d76de9d4203fe8b0081b4a8b /libmpdemux | |
parent | 12bab01104963fb1bdc624419ae2988f71b83c6a (diff) | |
download | mpv-62df332dd5571b27f839a2280aee48268142394f.tar.bz2 mpv-62df332dd5571b27f839a2280aee48268142394f.tar.xz |
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
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_real.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c index ea9c3046e0..8f598aa3d5 100644 --- a/libmpdemux/demux_real.c +++ b/libmpdemux/demux_real.c @@ -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; |