changeset 1618:bccc4a9fcb3b libavcodec

small mjpeg fix by (James Stembridge <jstembridge at users dot sourceforge dot net>)
author michael
date Wed, 12 Nov 2003 22:01:13 +0000
parents 8b31f3a3e9fa
children 12530597714c
files mjpeg.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mjpeg.c	Wed Nov 12 13:03:51 2003 +0000
+++ b/mjpeg.c	Wed Nov 12 22:01:13 2003 +0000
@@ -1874,6 +1874,9 @@
         }
     }
 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;