[FFmpeg-cvslog] Do not assume AV_SAMPLE_FMT_S16 as tta sample format.
Carl Eugen Hoyos
git at videolan.org
Tue May 3 01:10:27 CEST 2011
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue May 3 01:02:07 2011 +0200| [fba418e6708a5271e933be27f346759e3d616e7c] | committer: Carl Eugen Hoyos
Do not assume AV_SAMPLE_FMT_S16 as tta sample format.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fba418e6708a5271e933be27f346759e3d616e7c
---
libavcodec/tta.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 3367788..217354c 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;
}
More information about the ffmpeg-cvslog
mailing list