[Mplayer-cvslog] CVS: main/libmpcodecs vd_libmpeg2.c,1.26,1.27

Attila Kinali CVS attila at mplayerhq.hu
Sat Oct 11 13:22:32 CEST 2003


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

Modified Files:
	vd_libmpeg2.c 
Log Message:
skip null frames in mpeg files, patch by Zoltan Hidvegi <mplayer at hzoli.2y.net>

I have an mpeg2 avi (created with mencoder -oac copy -ovc copy from a
dvd) that has null frames, probably inserted by mencoder.  I can play
that with -vfm ffmpeg, but mplayer dump when played with the default
libmpeg2, the trivial patch below fixes that.



Index: vd_libmpeg2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_libmpeg2.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- vd_libmpeg2.c	18 Aug 2003 14:49:06 -0000	1.26
+++ vd_libmpeg2.c	11 Oct 2003 11:21:54 -0000	1.27
@@ -97,6 +97,8 @@
     mp_image_t* mpi=NULL;
     int drop_frame, framedrop=flags&3;
 
+    if(len<=0) return NULL; // skipped null frame
+    
     // append extra 'end of frame' code:
     ((char*)data+len)[0]=0;
     ((char*)data+len)[1]=0;



More information about the MPlayer-cvslog mailing list