diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-28 00:31:11 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-11-02 14:41:16 -0400 |
commit | d9c6eece21dfecb510e33738092f7a43fc7d36f8 (patch) | |
tree | 3584e688103b3e44a9e9495a6893499268133506 /libavcodec/gsmdec.c | |
parent | 87c57d807fa198b97587bbf211b8d375f925c737 (diff) | |
download | ffmpeg-d9c6eece21dfecb510e33738092f7a43fc7d36f8.tar.gz |
gsm: use av_get_bytes_per_sample() in frame_bytes calculation
Diffstat (limited to 'libavcodec/gsmdec.c')
-rw-r--r-- | libavcodec/gsmdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c index 7c247a6b65..57286c796f 100644 --- a/libavcodec/gsmdec.c +++ b/libavcodec/gsmdec.c @@ -58,7 +58,8 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; int16_t *samples = data; - int frame_bytes = 2 * avctx->frame_size; + int frame_bytes = avctx->frame_size * + av_get_bytes_per_sample(avctx->sample_fmt); if (*data_size < frame_bytes) return -1; |