get_byte may not return -1 on error, since it can lead to a negative backptr.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 14 Jan 2006 14:59:11 +0000 (14:59 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 14 Jan 2006 14:59:11 +0000 (14:59 +0000)
Originally committed as revision 4854 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/lzo.c

index 46166a1..ab7766b 100644 (file)
@@ -34,7 +34,7 @@ static inline int get_byte(LZOContext *c) {
     if (c->in < c->in_end)
         return *c->in++;
     c->error |= LZO_INPUT_DEPLETED;
     if (c->in < c->in_end)
         return *c->in++;
     c->error |= LZO_INPUT_DEPLETED;
-    return -1;
+    return 0;
 }
 
 /**
 }
 
 /**