From e74f2be1edde688cbf91614faa20bb89558be91d Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Sun, 30 Nov 2014 01:52:04 +0100
Subject: [PATCH] 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>
---
 libavformat/riffdec.c | 3 +++
 1 file changed, 3 insertions(+)

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);