mirror of
https://github.com/mpv-player/mpv
synced 2025-01-02 21:12:23 +00:00
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11081 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
56490d4faa
commit
12882989fc
@ -97,6 +97,8 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user