[MPlayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.143,1.144

Jindrich Makovicka CVS syncmail at mplayerhq.hu
Wed May 25 11:20:53 CEST 2005


CVS change done by Jindrich Makovicka CVS

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

Modified Files:
	vd_ffmpeg.c 
Log Message:
prefer width&height from bitmapinfoheader for h263 streams
fixes playback of some MOV files
(http://mplayerhq.hu/pipermail/mplayer-dev-eng/2004-July/027777.html)


Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -r1.143 -r1.144
--- vd_ffmpeg.c	7 Apr 2005 22:04:08 -0000	1.143
+++ vd_ffmpeg.c	25 May 2005 09:20:50 -0000	1.144
@@ -467,12 +467,20 @@
 #else
     float aspect= avctx->aspect_ratio;
 #endif
+    int width, height;
 
+    width = avctx->width;
+    height = avctx->height;
+    if (sh->bih && sh->format == mmioFOURCC('h','2','6','3')) {
+	width = sh->bih->biWidth;
+	height = sh->bih->biHeight;
+    }
+    
      // it is possible another vo buffers to be used after vo config()
      // lavc reset its buffers on width/heigh change but not on aspect change!!!
     if (// aspect != ctx->last_aspect ||
-	avctx->width != sh->disp_w ||
-	avctx->height != sh->disp_h ||
+	width != sh->disp_w  ||
+	height != sh->disp_h ||
 	!ctx->vo_inited)
     {
 	mp_msg(MSGT_DECVIDEO, MSGL_V, "[ffmpeg] aspect_ratio: %f\n", aspect);
@@ -480,8 +488,8 @@
 //	if(ctx->last_aspect>=0.01 && ctx->last_aspect<100)
 	if(sh->aspect==0.0)
 	    sh->aspect = ctx->last_aspect;
-	sh->disp_w = avctx->width;
-	sh->disp_h = avctx->height;
+	sh->disp_w = width;
+	sh->disp_h = height;
 	ctx->vo_inited=1;
 	switch(pix_fmt){
 	// YUVJ are YUV formats that use the full Y range and not just




More information about the MPlayer-cvslog mailing list