aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/aiffdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-19 01:44:14 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-19 01:44:14 +0100
commitc5c09501f947ccffd98de45ac87050d703c1e6a5 (patch)
treec7a536ff1d62c6359e48e8bdd2f97504018dc5d9 /libavformat/aiffdec.c
parentae81e8a9c5e5511a5bdc34b9a10697c835923c0c (diff)
downloadffmpeg-c5c09501f947ccffd98de45ac87050d703c1e6a5.tar.gz
avformat/aiffdec: do not fail if header parser hits EOF
Based on patch by Martin Vignali <martin.vignali@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/aiffdec.c')
-rw-r--r--libavformat/aiffdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index a5ad6cf956..ff04c2b8f4 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -223,6 +223,11 @@ static int aiff_read_header(AVFormatContext *s)
while (filesize > 0) {
/* parse different chunks */
size = get_tag(pb, &tag);
+
+ if (size == AVERROR_EOF && offset > 0 && st->codec->block_align) {
+ av_log(s, AV_LOG_WARNING, "header parser hit EOF\n");
+ goto got_sound;
+ }
if (size < 0)
return size;