Mercurial > mplayer.hg
changeset 34762:c1db6548917e
RM demuxer: set aspect from container video dimensions.
Fixes the sample from FFmpeg trac issue #785.
author | reimar |
---|---|
date | Mon, 09 Apr 2012 11:25:57 +0000 |
parents | 02a03e00341e |
children | 6834d78ac904 |
files | libmpdemux/demux_real.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_real.c Sat Apr 07 20:08:53 2012 +0000 +++ b/libmpdemux/demux_real.c Mon Apr 09 11:25:57 2012 +0000 @@ -1519,6 +1519,8 @@ 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;