summaryrefslogtreecommitdiff
path: root/libavcodec/qdrw.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-05-11 20:11:04 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-05-12 15:28:31 +0100
commit0348e74c01a099a3787ae21df1c2a742fc846163 (patch)
treebc76d49dcf37d04e8e3d5f22078bcfe452aff1c3 /libavcodec/qdrw.c
parentd0dce15da34c0e4eee6c683be299de0221db00d3 (diff)
downloadffmpeg-0348e74c01a099a3787ae21df1c2a742fc846163.tar.gz
quickdraw: Skip the empty 512 byte header for images
Found-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Diffstat (limited to 'libavcodec/qdrw.c')
-rw-r--r--libavcodec/qdrw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index f7a437711b..477175c066 100644
--- a/libavcodec/qdrw.c
+++ b/libavcodec/qdrw.c
@@ -125,6 +125,10 @@ static int decode_frame(AVCodecContext *avctx,
bytestream2_init(&gbc, avpkt->data, avpkt->size);
+ /* PICT images start with a 512 bytes empty header */
+ if (bytestream2_peek_be32(&gbc) == 0)
+ bytestream2_skip(&gbc, 512);
+
/* smallest PICT header */
if (bytestream2_get_bytes_left(&gbc) < 40) {
av_log(avctx, AV_LOG_ERROR, "Frame is too small %d\n",