[MPlayer-cvslog] CVS: main/libmpcodecs vd_libmpeg2.c,1.41,1.42

Nico Sabbi CVS syncmail at mplayerhq.hu
Thu May 11 00:03:20 CEST 2006


CVS change done by Nico Sabbi CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv13989/libmpcodecs

Modified Files:
	vd_libmpeg2.c 
Log Message:
moved code to set aspect ratio for mpeg12 away from video.c and into decoder files; A/R changes work correctly with -vc mpeg12 

Index: vd_libmpeg2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_libmpeg2.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- vd_libmpeg2.c	27 Apr 2006 02:46:33 -0000	1.41
+++ vd_libmpeg2.c	10 May 2006 22:03:18 -0000	1.42
@@ -157,6 +157,7 @@
 	int state=mpeg2_parse (mpeg2dec);
 	int type, use_callback;
 	mp_image_t* mpi_new;
+	unsigned long pw, ph;
 	
 	switch(state){
 	case STATE_BUFFER:
@@ -170,6 +171,9 @@
 	    }
 	    break;
 	case STATE_SEQUENCE:
+	    pw = info->sequence->display_width * info->sequence->pixel_width;
+	    ph = info->sequence->display_height * info->sequence->pixel_height;
+	    if(ph) sh->aspect = (float) pw / (float) ph;
 	    // video parameters inited/changed, (re)init libvo:
 	    if (info->sequence->width >> 1 == info->sequence->chroma_width &&
 		info->sequence->height >> 1 == info->sequence->chroma_height) {




More information about the MPlayer-cvslog mailing list