diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index ed372bc996ef0150556524278c211dbff05ed929..7c95f89bbde8ade77166b20a9881ba9f71237774 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);