summaryrefslogtreecommitdiff
path: root/libavformat/iff.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2012-11-18 19:02:03 +1100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-18 13:47:17 +0100
commit05001dd7ca398f495f35e1b4ef7282d2b1dfdaf0 (patch)
treeafd675b9c5264b3d928280c3d7d6b40c470a77c1 /libavformat/iff.c
parentd26eeb0dc1dd8f8aab0a5ed5830c3e34ce795aee (diff)
downloadffmpeg-05001dd7ca398f495f35e1b4ef7282d2b1dfdaf0.tar.gz
iff: process DEEP DLOC chunk to obtain image dimensions
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/iff.c')
-rw-r--r--libavformat/iff.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c
index d4bdf508cc..53e104d84a 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -63,6 +63,7 @@
#define ID_BODY MKTAG('B','O','D','Y')
#define ID_DBOD MKTAG('D','B','O','D')
#define ID_DPEL MKTAG('D','P','E','L')
+#define ID_DLOC MKTAG('D','L','O','C')
#define LEFT 2
#define RIGHT 4
@@ -281,6 +282,13 @@ static int iff_read_header(AVFormatContext *s)
st->codec->bits_per_coded_sample = 24;
break;
+ case ID_DLOC:
+ if (data_size < 4)
+ return AVERROR_INVALIDDATA;
+ st->codec->width = avio_rb16(pb);
+ st->codec->height = avio_rb16(pb);
+ break;
+
case ID_ANNO:
case ID_TEXT: metadata_tag = "comment"; break;
case ID_AUTH: metadata_tag = "artist"; break;