From 62df332dd5571b27f839a2280aee48268142394f Mon Sep 17 00:00:00 2001 From: mplayer-svn Date: Mon, 9 Apr 2012 11:25:57 +0000 Subject: [PATCH] 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 --- libmpdemux/demux_real.c | 2 ++ 1 file changed, 2 insertions(+) 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;