[FFmpeg-cvslog] tiff: print error for old style LZW

Michael Niedermayer git at videolan.org
Thu Jan 3 04:40:01 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jan  3 04:25:55 2013 +0100| [52334f5be2ef31a5c836f689f3ab95b25bad026a] | committer: Michael Niedermayer

tiff: print error for old style LZW

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52334f5be2ef31a5c836f689f3ab95b25bad026a
---

 libavcodec/tiff.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index e92967d..f700097 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -462,6 +462,9 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t *dst, int stride,
             src = s->deinvert_buf;
             ssrc = src;
         }
+        if (size > 1 && !src[0] && (src[1]&1)) {
+            av_log(s->avctx, AV_LOG_ERROR, "Old style LZW is unsupported\n");
+        }
         if (ff_lzw_decode_init(s->lzw, 8, src, size, FF_LZW_TIFF) < 0) {
             av_log(s->avctx, AV_LOG_ERROR, "Error initializing LZW decoder\n");
             return -1;



More information about the ffmpeg-cvslog mailing list