OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fff16b
)
Set the step index correctly for flash adpcm. Patch by Baptiste
author
Baptiste Coudurier
<baptiste.coudurier@smartjog.com>
Wed, 18 Jul 2007 18:40:03 +0000
(18:40 +0000)
committer
Benjamin Larsson
<banan@ludd.ltu.se>
Wed, 18 Jul 2007 18:40:03 +0000
(18:40 +0000)
Coudurier.
Originally committed as revision 9743 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/adpcm.c
patch
|
blob
|
history
diff --git
a/libavcodec/adpcm.c
b/libavcodec/adpcm.c
index
5539cf9
..
9111a7a
100644
(file)
--- a/
libavcodec/adpcm.c
+++ b/
libavcodec/adpcm.c
@@
-531,8
+531,9
@@
static int adpcm_encode_frame(AVCodecContext *avctx,
//Init the encoder state
for(i=0; i<avctx->channels; i++){
+ c->status[i].step_index = av_clip(c->status[i].step_index, 0, 63); // clip step so it fits 6 bits
put_bits(&pb, 16, samples[i] & 0xFFFF);
- put_bits(&pb, 6, c->status[i].step_index
& 0x3F
);
+ put_bits(&pb, 6, c->status[i].step_index);
c->status[i].prev_sample = (signed short)samples[i];
}