# HG changeset patch # User attila # Date 1065871314 0 # Node ID 26f1b3ad4a77150c111e0fb42b5de82bf959202e # Parent d4df1e5e5e49ce3e62586ab2ee9880c5e097064a skip null frames in mpeg files, patch by Zoltan Hidvegi 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. diff -r d4df1e5e5e49 -r 26f1b3ad4a77 libmpcodecs/vd_libmpeg2.c --- 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;