[FFmpeg-cvslog] avformat/riffdec: ask for samples with wav header size < 14

Michael Niedermayer git at videolan.org
Sun Nov 30 02:05:18 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 30 01:52:04 2014 +0100| [e74f2be1edde688cbf91614faa20bb89558be91d] | committer: Michael Niedermayer

avformat/riffdec: ask for samples with wav header size < 14

Based on commit by Hendrik Leppkes <h.leppkes at gmail.com>

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/riffdec.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index 09fee9d..88e2229 100644
--- a/libavformat/riffdec.c
+++ b/libavformat/riffdec.c
@@ -84,6 +84,9 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
 {
     int id;
 
+    if (size < 14)
+        avpriv_request_sample(codec, "wav header size < 14");
+
     id                 = avio_rl16(pb);
     codec->codec_type  = AVMEDIA_TYPE_AUDIO;
     codec->channels    = avio_rl16(pb);



More information about the ffmpeg-cvslog mailing list