[MPlayer-cvslog] r34850 - trunk/libmpdemux/demux_real.c

reimar subversion at mplayerhq.hu
Mon Apr 9 13:25:57 CEST 2012


Author: reimar
Date: Mon Apr  9 13:25:57 2012
New Revision: 34850

Log:
RM demuxer: set aspect from container video dimensions.

Fixes the sample from FFmpeg trac issue #785.

Modified:
   trunk/libmpdemux/demux_real.c

Modified: trunk/libmpdemux/demux_real.c
==============================================================================
--- trunk/libmpdemux/demux_real.c	Sat Apr  7 22:08:53 2012	(r34849)
+++ trunk/libmpdemux/demux_real.c	Mon Apr  9 13:25:57 2012	(r34850)
@@ -1519,6 +1519,8 @@ static demuxer_t* demux_open_real(demuxe
 	    	    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;


More information about the MPlayer-cvslog mailing list