summaryrefslogtreecommitdiff
path: root/libavformat/tta.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-26 02:09:31 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-26 02:36:07 +0200
commit51bfaa21c85201ab31776a447599349a1ed6e96b (patch)
treeb7baafad803a06c5d582606f37f91a27e8342e59 /libavformat/tta.c
parentf5fdb12d5552a3710611f15cd72ce6c7b6fb4da0 (diff)
parenta3a8572165ce636fb011b78764a2584777f81b95 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits) g722dec: check output buffer size before decoding g722dec: cosmetics: reindent/linewrap g722dec: remove the use of lowres for half-rate decoding. tta: check for extradata allocation failure in tta demuxer tta: check for allocation failure of decode_buffer tta: use correct frame_length calculation. tta: add support for decoding 24-bit sample format cosmetics: indentation tta: remove pointless braces tta: check output buffer size after adjusting frame length for last frame tta: fix reading of format in TTA header. tta: remove useless commented-out lines tta: check remaining bitstream size while reading unary value lavf: deprecate AVStream.stream_copy avconc: split choose_codec() to choose_decoder/choose_encoder. lavf: simplify by using FFMAX/FFMIN. mpegenc: add preload private option. cosmetics: simplify latm_decode_init latm: avoid unnecessary reinit of the aac decoder aacdec: initialize sbr context only in new channel elements ... Conflicts: avconv.c libavcodec/resample.c libavcodec/tta.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/tta.c')
-rw-r--r--libavformat/tta.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/tta.c b/libavformat/tta.c
index ca2d36b44f..4d0c6adeee 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -107,6 +107,10 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
return -1;
}
st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!st->codec->extradata) {
+ st->codec->extradata_size = 0;
+ return AVERROR(ENOMEM);
+ }
avio_seek(s->pb, start_offset, SEEK_SET);
avio_read(s->pb, st->codec->extradata, st->codec->extradata_size);