[Mplayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.59,1.60

Michael Niedermayer michael at mplayerhq.hu
Mon Oct 14 14:52:13 CEST 2002


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

Modified Files:
	vd_ffmpeg.c 
Log Message:
put M4S2 & MP4S headers in avctx->extradata (in the unlikely case that they arent missing completly)


Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- vd_ffmpeg.c	13 Oct 2002 13:49:08 -0000	1.59
+++ vd_ffmpeg.c	14 Oct 2002 12:51:55 -0000	1.60
@@ -229,6 +229,14 @@
 
 //        printf("%X %X %d %d\n", extrahdr[0], extrahdr[1]);
     }
+    if (sh->bih && (sh->bih->biSize != sizeof(BITMAPINFOHEADER)) &&
+	(sh->format == mmioFOURCC('M','4','S','2') ||
+	 sh->format == mmioFOURCC('M','P','4','S')))
+    {
+	avctx->extradata_size = sh->bih->biSize-sizeof(BITMAPINFOHEADER);
+	avctx->extradata = malloc(avctx->extradata_size);
+	memcpy(avctx->extradata, sh->bih+1, avctx->extradata_size);
+    }
 
     /* open it */
     if (avcodec_open(avctx, lavc_codec) < 0) {




More information about the MPlayer-cvslog mailing list