break if eob is reached to avoid reading one too much byte
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 24 Mar 2007 23:23:05 +0000 (23:23 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 24 Mar 2007 23:23:05 +0000 (23:23 +0000)
Originally committed as revision 8498 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/lzw.c

index b5bb33a..4afbc86 100644 (file)
@@ -77,6 +77,7 @@ static int lzw_get_code(struct LZWState * s)
                 s->bs = sizbuf;
                 if(!sizbuf) {
                     s->eob_reached = 1;
+                    break;
                 }
             }
             s->bbuf |= (*s->pbuf++) << s->bbits;