Browse Source

Do not assume AV_SAMPLE_FMT_S16 as tta sample format.

tags/n0.8
Carl Eugen Hoyos 14 years ago
parent
commit
fba418e670
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/tta.c

+ 1
- 1
libavcodec/tta.c View File

@@ -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