Browse Source

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>
tags/n2.5
Michael Niedermayer 11 years ago
parent
commit
e74f2be1ed
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/riffdec.c

+ 3
- 0
libavformat/riffdec.c View File

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


Loading…
Cancel
Save