[Mplayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.3,1.4

Alex Beregszaszi alex at mplayer.dev.hu
Tue Mar 19 23:12:21 CET 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mplayer:/var/tmp.root/cvs-serv9147

Modified Files:
	vd_ffmpeg.c 
Log Message:
config vo if resolution changed (after decoded image read the dimensions out of lavc context)

Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vd_ffmpeg.c	16 Mar 2002 01:10:31 -0000	1.3
+++ vd_ffmpeg.c	19 Mar 2002 22:12:18 -0000	1.4
@@ -98,10 +98,17 @@
     if(ret<0) mp_msg(MSGT_DECVIDEO,MSGL_WARN, "Error while decoding frame!\n");
     if(!got_picture) return NULL;	// skipped image
     
+    if ((ctx->width != sh->disp_w) ||
+	(ctx->height != sh->disp_h))
+    {
+	if (mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12))
+	    return NULL;
+    }	
+    
     mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE,
 	ctx->width, ctx->height);
     if(!mpi){	// temporary!
-	printf("couldn't allocate image for cinepak codec\n");
+	printf("couldn't allocate image for codec\n");
 	return NULL;
     }
     




More information about the MPlayer-cvslog mailing list