mirror of
https://github.com/mpv-player/mpv
synced 2025-04-30 15:20:59 +00:00
Avoid decoding of 0-size packets. This also fixes that the main loop believes
tehre is an infinite number of delayed frames, thus never finishing (happens with -demuxer lavf -vc theora). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31206 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4ad8b9e0cc
commit
9016e5cf0a
@ -168,6 +168,10 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags)
|
|||||||
yuv_buffer yuv;
|
yuv_buffer yuv;
|
||||||
mp_image_t* mpi;
|
mp_image_t* mpi;
|
||||||
|
|
||||||
|
// no delayed frames
|
||||||
|
if (!data || !len)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
memset (&op, 0, sizeof (op));
|
memset (&op, 0, sizeof (op));
|
||||||
op.bytes = len;
|
op.bytes = len;
|
||||||
op.packet = data;
|
op.packet = data;
|
||||||
|
Loading…
Reference in New Issue
Block a user