[FFmpeg-cvslog] quickdraw: Skip the empty 512 byte header for images

Vittorio Giovara git at videolan.org
Wed May 13 21:59:30 CEST 2015


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon May 11 20:11:04 2015 +0100| [0348e74c01a099a3787ae21df1c2a742fc846163] | committer: Vittorio Giovara

quickdraw: Skip the empty 512 byte header for images

Found-by: Carl Eugen Hoyos <cehoyos at ag.or.at>

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

 libavcodec/qdrw.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index f7a4377..477175c 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",



More information about the ffmpeg-cvslog mailing list