[MPlayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.160,1.161

Reimar Döffinger CVS syncmail at mplayerhq.hu
Mon Mar 27 12:32:55 CEST 2006


CVS change done by Reimar Döffinger CVS

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

Modified Files:
	vd_ffmpeg.c 
Log Message:
reinit vo when pix_fmt changes.
Avoids broken image or even crash with mf://*.jpg and JPGs with different chroma sampling.


Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -r1.160 -r1.161
--- vd_ffmpeg.c	24 Mar 2006 08:12:02 -0000	1.160
+++ vd_ffmpeg.c	27 Mar 2006 10:32:52 -0000	1.161
@@ -58,6 +58,7 @@
 typedef struct {
     AVCodecContext *avctx;
     AVFrame *pic;
+    enum PixelFormat pix_fmt;
     float last_aspect;
     int do_slices;
     int do_dr1;
@@ -533,6 +534,7 @@
     if (// aspect != ctx->last_aspect ||
 	width != sh->disp_w  ||
 	height != sh->disp_h ||
+	pix_fmt != ctx->pix_fmt ||
 	!ctx->vo_inited)
     {
 	mp_msg(MSGT_DECVIDEO, MSGL_V, "[ffmpeg] aspect_ratio: %f\n", aspect);
@@ -542,6 +544,7 @@
 	    sh->aspect = ctx->last_aspect;
 	sh->disp_w = width;
 	sh->disp_h = height;
+	ctx->pix_fmt = pix_fmt;
 	switch(pix_fmt){
 	// YUVJ are YUV formats that use the full Y range and not just
 	// 16 - 235 (see colorspaces.txt).




More information about the MPlayer-cvslog mailing list