]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/lzw.c
mpegvideo: make ff_release_unused_pictures() static
[ffmpeg] / libavcodec / lzw.c
index 2c99014c2a9fe574fda5811b01f9d07cb111a497..016714021c053283033bbf402bfea296ee70339a 100644 (file)
@@ -43,7 +43,7 @@ static const uint16_t mask[17] =
 };
 
 struct LZWState {
-    const uint8_t *pbuf, *ebuf;
+    const uint8_t *buf_start, *pbuf, *ebuf;
     int bbits;
     unsigned int bbuf;
 
@@ -92,9 +92,10 @@ static int lzw_get_code(struct LZWState * s)
     return c & s->curmask;
 }
 
-const uint8_t* ff_lzw_cur_ptr(LZWState *p)
+int ff_lzw_size_read(LZWState *p)
 {
-    return ((struct LZWState*)p)->pbuf;
+    struct LZWState *s = p;
+    return s->pbuf - s->buf_start;
 }
 
 void ff_lzw_decode_tail(LZWState *p)