[Mplayer-cvslog] CVS: main/libmpdemux demux_y4m.c,1.7,1.8

Rik Snel CVS syncmail at mplayerhq.hu
Thu Jun 3 11:52:28 CEST 2004


CVS change done by Rik Snel CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv8268

Modified Files:
	demux_y4m.c 
Log Message:
fix bug reported by Leonardo Giordani: sh->aspect is not pixel aspect but movie aspect

Index: demux_y4m.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_y4m.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- demux_y4m.c	22 Mar 2003 19:50:10 -0000	1.7
+++ demux_y4m.c	3 Jun 2004 09:52:25 -0000	1.8
@@ -195,11 +195,13 @@
 	sh->frametime=1.0f/sh->fps;
 	
 	ratio = y4m_si_get_sampleaspect(priv->si);
-	if (ratio.d != 0 && ratio.n != 0)
-	    sh->aspect = (float)ratio.n/(float)ratio.d;
 
 	sh->disp_w = y4m_si_get_width(priv->si);
 	sh->disp_h = y4m_si_get_height(priv->si);
+
+	if (ratio.d != 0 && ratio.n != 0)
+	    sh->aspect = (float)(sh->disp_w*ratio.n)/(float)(sh->disp_h*ratio.d);
+
     	demuxer->seekable = 0;
     }
 




More information about the MPlayer-cvslog mailing list