From 56f6628bca66ef3b6a1028fcf0f52dbe01115d89 Mon Sep 17 00:00:00 2001
From: Peter Ross <pross@xvid.org>
Date: Sat, 3 Dec 2011 12:21:33 +1100
Subject: [PATCH] pictordec: decode 8bpp images when extra header marker is
 missing

Fixes ticket #696.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
---
 libavcodec/pictordec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index ed372bc996e..7c95f89bbde 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -130,7 +130,7 @@ static int decode_frame(AVCodecContext *avctx,
         return AVERROR_INVALIDDATA;
     }
 
-    if (*buf == 0xFF) {
+    if (*buf == 0xFF || bpp == 8) {
         buf += 2;
         etype  = bytestream_get_le16(&buf);
         esize  = bytestream_get_le16(&buf);
-- 
GitLab