changeset 11080:26f1b3ad4a77

skip null frames in mpeg files, patch by Zoltan Hidvegi <mplayer@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.
author attila
date Sat, 11 Oct 2003 11:21:54 +0000
parents d4df1e5e5e49
children 80a90c3e2f89
files libmpcodecs/vd_libmpeg2.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_libmpeg2.c	Sat Oct 11 08:31:34 2003 +0000
+++ b/libmpcodecs/vd_libmpeg2.c	Sat Oct 11 11:21:54 2003 +0000
@@ -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;