diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-05-03 01:02:07 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2011-05-03 01:02:07 +0200 |
commit | fba418e6708a5271e933be27f346759e3d616e7c (patch) | |
tree | a21272daf04cc49a3cf573ce8fc2cb0b3e1334e4 | |
parent | 3b4621acbb9b0b1f69dae3f14b01762fce912309 (diff) | |
download | ffmpeg-fba418e6708a5271e933be27f346759e3d616e7c.tar.gz |
Do not assume AV_SAMPLE_FMT_S16 as tta sample format.
-rw-r--r-- | libavcodec/tta.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c index 3367788633..217354c863 100644 --- a/libavcodec/tta.c +++ b/libavcodec/tta.c @@ -325,7 +325,7 @@ static int tta_decode_frame(AVCodecContext *avctx, int cur_chan = 0, framelen = s->frame_length; int32_t *p; - if (*data_size < (framelen * s->channels * 2)) { + if (*data_size < (framelen * s->channels * av_get_bits_per_sample_fmt(avctx->sample_fmt) / 8)) { av_log(avctx, AV_LOG_ERROR, "Output buffer size is too small.\n"); return -1; } |