[FFmpeg-cvslog] avformat/aiffdec: do not fail if header parser hits EOF

Michael Niedermayer git at videolan.org
Thu Mar 19 01:53:54 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 19 01:44:14 2015 +0100| [c5c09501f947ccffd98de45ac87050d703c1e6a5] | committer: Michael Niedermayer

avformat/aiffdec: do not fail if header parser hits EOF

Based on patch by Martin Vignali <martin.vignali at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5c09501f947ccffd98de45ac87050d703c1e6a5
---

 libavformat/aiffdec.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index a5ad6cf..ff04c2b 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;
 



More information about the ffmpeg-cvslog mailing list