summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-05-23 23:24:25 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-05-23 23:24:25 +0000
commit9016e5cf0ab3bd42befb7ceadbb4b3224d5df61b (patch)
tree791d90ad8ba9eccd342aad1c9107c8c249465661 /libmpcodecs
parent4ad8b9e0cc6e3c370d682a08e877ffbff992089e (diff)
downloadmpv-9016e5cf0ab3bd42befb7ceadbb4b3224d5df61b.tar.bz2
mpv-9016e5cf0ab3bd42befb7ceadbb4b3224d5df61b.tar.xz
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
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_theora.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmpcodecs/vd_theora.c b/libmpcodecs/vd_theora.c
index c39e85bf1a..9da6e2d6cd 100644
--- a/libmpcodecs/vd_theora.c
+++ b/libmpcodecs/vd_theora.c
@@ -168,6 +168,10 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags)
yuv_buffer yuv;
mp_image_t* mpi;
+ // no delayed frames
+ if (!data || !len)
+ return NULL;
+
memset (&op, 0, sizeof (op));
op.bytes = len;
op.packet = data;