[FFmpeg-devel] [PATCH]Also support real-world qdraw samples

Carl Eugen Hoyos cehoyos at ag.or.at
Wed May 6 23:11:53 CEST 2015


Hi!

Attached patch allows decoding of the qdraw files I found.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index b650ade..b7a7cf5 100644
--- a/libavcodec/qdrw.c
+++ b/libavcodec/qdrw.c
@@ -124,6 +124,10 @@ static int decode_frame(AVCodecContext *avctx,
     int w, h, ret;
 
     bytestream2_init(&gbc, avpkt->data, avpkt->size);
+    if (   avpkt->size >= 552
+        && AV_RB32(&avpkt->data[ 10]) != 0x001102FF
+        && AV_RB32(&avpkt->data[522]) == 0x001102FF)
+        bytestream2_skip(&gbc, 512);
 
     /* smallest PICT header */
     if (bytestream2_get_bytes_left(&gbc) < 40) {


More information about the ffmpeg-devel mailing list