projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87c57d8
)
gsm: use av_get_bytes_per_sample() in frame_bytes calculation
author
Justin Ruggles
<justin.ruggles@gmail.com>
Fri, 28 Oct 2011 04:31:11 +0000
(
00:31
-0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 2 Nov 2011 18:41:16 +0000
(14:41 -0400)
libavcodec/gsmdec.c
patch
|
blob
|
blame
|
history
diff --git
a/libavcodec/gsmdec.c
b/libavcodec/gsmdec.c
index
7c247a6
..
57286c7
100644
(file)
--- 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;