From 7d5873594298d94f9945b53bbb82f1e83a82b8e5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 12 Nov 2003 22:01:13 +0000 Subject: [PATCH] small mjpeg fix by (James Stembridge ) Originally committed as revision 2512 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mjpeg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c index 068281d31c..874d1a7050 100644 --- a/libavcodec/mjpeg.c +++ b/libavcodec/mjpeg.c @@ -1874,6 +1874,9 @@ not_the_end: } } the_end: + if(buf_ptr > buf_end) + buf_ptr = buf_end; + dprintf("mjpeg decode frame unused %d bytes\n", buf_end - buf_ptr); // return buf_end - buf_ptr; return buf_ptr - buf;