Do not assume AV_SAMPLE_FMT_S16 as tta sample format.

pull/2/head
Carl Eugen Hoyos 14 years ago
parent 3b4621acbb
commit fba418e670
  1. 2
      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;
}

Loading…
Cancel
Save