diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-11 00:40:09 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-11 01:05:33 +0100 |
commit | 964912aba56a29acf25c9e216255ea44190f419a (patch) | |
tree | fa82f5555f1604d36380b186f1f89403d0b9c388 /libavcodec/tta.c | |
parent | cdba9b617f1a77f035416096f3ea91158ec5307b (diff) | |
parent | 2e87b4c51152e0241cae7f655d53920029a0e632 (diff) | |
download | ffmpeg-964912aba56a29acf25c9e216255ea44190f419a.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
Warn about avserver being broken.
avconv: drop code for special handling of avserver streams.
rawdec: don't set codec timebase.
lavf doxy: add muxing stuff to lavf_encoding group
lavf doxy: add demuxing stuff to lavf_decoding group
lavf doxy: expand/reword metadata API doxy.
lavf doxy: add installed headers to groups.
lavf doxy: add avio groups into the lavf_io group.
lavf doxy: rename lavf I/O group to lavf_io.
lavf doxy: add metadata docs to the main lavf group
ttadec: check channel count as read from extradata.
Add CLJR encoding and decoding regression tests
cljr: remove unused code
flacdec: Support for tracks in cuesheet metadata block
ptx: fix inverted check for sufficient data
flac muxer: fix writing of file header and STREAMINFO header from extradata
ptx: emit a warning on insufficient picture data
utvideo: add fate tests covering all codec variants
doc: update to refer to avconv
doc: remove some stale entries from the faq
...
Conflicts:
Changelog
avconv.c
doc/avconv.texi
doc/faq.texi
doc/ffplay.texi
doc/ffprobe.texi
doc/ffserver.texi
libavcodec/avcodec.h
libavcodec/cljr.c
libavformat/avformat.h
libavformat/riff.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/tta.c')
-rw-r--r-- | libavcodec/tta.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c index 3c4c152213..2c3539e44f 100644 --- a/libavcodec/tta.c +++ b/libavcodec/tta.c @@ -233,6 +233,11 @@ static av_cold int tta_decode_init(AVCodecContext * avctx) s->data_length = get_bits_long(&s->gb, 32); skip_bits(&s->gb, 32); // CRC32 of header + if (s->channels == 0) { + av_log(s->avctx, AV_LOG_ERROR, "Invalid number of channels\n"); + return AVERROR_INVALIDDATA; + } + switch(s->bps) { case 1: avctx->sample_fmt = AV_SAMPLE_FMT_U8; break; case 2: |