aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-11-30 10:44:00 +0000
committerPaul B Mahol <onemda@gmail.com>2012-11-30 10:44:00 +0000
commit1560c3295db00119e1bef51c2eca1957edd972f4 (patch)
tree4792596e163d304b282e8f78fe41eafcaaacfe95 /libavformat
parent50b5c2296ab35eb0c7c5d3d09151361049589d94 (diff)
downloadffmpeg-1560c3295db00119e1bef51c2eca1957edd972f4.tar.gz
iff: fix some incorrect interpretations of invalid files
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/iff.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c
index 810a7b3870..e59d49bf72 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -167,6 +167,10 @@ static int iff_read_header(AVFormatContext *s)
avio_skip(pb, 8);
// codec_tag used by ByteRun1 decoder to distinguish progressive (PBM) and interlaced (ILBM) content
st->codec->codec_tag = avio_rl32(pb);
+ iff->bitmap_compression = -1;
+ iff->svx8_compression = -1;
+ iff->maud_bits = -1;
+ iff->maud_compression = -1;
while(!url_feof(pb)) {
uint64_t orig_pos;
@@ -193,8 +197,6 @@ static int iff_read_header(AVFormatContext *s)
case ID_MHDR:
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- iff->maud_bits = -1;
- iff->maud_compression = -1;
if (data_size < 32)
return AVERROR_INVALIDDATA;
avio_skip(pb, 4);
@@ -250,7 +252,6 @@ static int iff_read_header(AVFormatContext *s)
break;
case ID_BMHD:
- iff->bitmap_compression = -1;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
if (data_size <= 8)
return AVERROR_INVALIDDATA;