aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/img2dec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-05-07 01:10:45 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-05-07 01:21:08 +0200
commit2279de6eca1294082a307feb211b217781da8045 (patch)
tree37aa94600a87c89951dd45fc79c04e862fbe8b7f /libavformat/img2dec.c
parentb453e768427969b170820e8e8fe51c84856563b2 (diff)
downloadffmpeg-2279de6eca1294082a307feb211b217781da8045.tar.gz
lavf/img2dec: Autodetect qdraw images.
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r--libavformat/img2dec.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 5fc5b8342d..ba2911074b 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -707,6 +707,16 @@ static int jpegls_probe(AVProbeData *p)
return 0;
}
+static int qdraw_probe(AVProbeData *p)
+{
+ const uint8_t *b = p->buf;
+
+ if (!b[10] && AV_RB32(b+11) == 0x1102ff0c && !b[15] ||
+ p->buf_size >= 528 && !b[522] && AV_RB32(b+523) == 0x1102ff0c && !b[527])
+ return AVPROBE_SCORE_EXTENSION + 1;
+ return 0;
+}
+
static int pictor_probe(AVProbeData *p)
{
const uint8_t *b = p->buf;
@@ -793,6 +803,7 @@ IMAGEAUTO_DEMUXER(jpeg, AV_CODEC_ID_MJPEG)
IMAGEAUTO_DEMUXER(jpegls, AV_CODEC_ID_JPEGLS)
IMAGEAUTO_DEMUXER(pictor, AV_CODEC_ID_PICTOR)
IMAGEAUTO_DEMUXER(png, AV_CODEC_ID_PNG)
+IMAGEAUTO_DEMUXER(qdraw, AV_CODEC_ID_QDRAW)
IMAGEAUTO_DEMUXER(sgi, AV_CODEC_ID_SGI)
IMAGEAUTO_DEMUXER(sunrast, AV_CODEC_ID_SUNRAST)
IMAGEAUTO_DEMUXER(tiff, AV_CODEC_ID_TIFF)