summaryrefslogtreecommitdiff
path: root/libavcodec/tta.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-05-03 01:02:07 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-05-03 01:02:07 +0200
commitfba418e6708a5271e933be27f346759e3d616e7c (patch)
treea21272daf04cc49a3cf573ce8fc2cb0b3e1334e4 /libavcodec/tta.c
parent3b4621acbb9b0b1f69dae3f14b01762fce912309 (diff)
Do not assume AV_SAMPLE_FMT_S16 as tta sample format.
Diffstat (limited to 'libavcodec/tta.c')
-rw-r--r--libavcodec/tta.c2
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;
}