summaryrefslogtreecommitdiff
path: root/libavcodec/mjpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-11-12 22:01:13 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-11-12 22:01:13 +0000
commit7d5873594298d94f9945b53bbb82f1e83a82b8e5 (patch)
treea233ebc2b8e0fb45e26a2082c0a24d2e7e32e658 /libavcodec/mjpeg.c
parent278de4755d2f30a17d7f8affabadf702050088d0 (diff)
small mjpeg fix by (James Stembridge <jstembridge at users dot sourceforge dot net>)
Originally committed as revision 2512 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpeg.c')
-rw-r--r--libavcodec/mjpeg.c3
1 files changed, 3 insertions, 0 deletions
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;