diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-01-23 12:23:27 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-01-24 14:13:46 -0500 |
commit | 02e7dbf5adc6aa702472010c33aec9bfd904702f (patch) | |
tree | 652aa219661b6752ec5f15af5ed9850a7617d39d /libavformat/westwood_vqa.c | |
parent | 220506d23f39da3e23d3d42fb7061f19cec8052c (diff) | |
download | ffmpeg-02e7dbf5adc6aa702472010c33aec9bfd904702f.tar.gz |
adpcm_ima_ws: fix stereo decoding
Stereo ADPCM IMA WS is planar for VQA version 3 and 2-sample interleaved for
VQA version 2.
Diffstat (limited to 'libavformat/westwood_vqa.c')
-rw-r--r-- | libavformat/westwood_vqa.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c index 4d6397b88c..c2aebe5e80 100644 --- a/libavformat/westwood_vqa.c +++ b/libavformat/westwood_vqa.c @@ -128,6 +128,12 @@ static int wsvqa_read_header(AVFormatContext *s, st->start_time = 0; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; + st->codec->extradata_size = VQA_HEADER_SIZE; + st->codec->extradata = av_mallocz(VQA_HEADER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); + if (!st->codec->extradata) + return AVERROR(ENOMEM); + memcpy(st->codec->extradata, header, VQA_HEADER_SIZE); + if (!sample_rate) sample_rate = 22050; st->codec->sample_rate = sample_rate; |