Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-30 03:52:04 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-11-30 03:55:36 +0300
commite74f2be1edde688cbf91614faa20bb89558be91d (patch)
tree0847d73760572c34be57e9981c60d2b1cccba6fd /libavformat/riffdec.c
parente4788e9cd9878a51b7780fa3e2d070288a2918b9 (diff)
avformat/riffdec: ask for samples with wav header size < 14
Based on commit by Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/riffdec.c')
-rw-r--r--libavformat/riffdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index 09fee9d603..88e2229a77 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);