OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6b0067
)
Fix possible endless loop when decoding amr.
author
Carl Eugen Hoyos
<cehoyos@ag.or.at>
Sun, 18 Dec 2011 13:20:14 +0000
(14:20 +0100)
committer
Carl Eugen Hoyos
<cehoyos@ag.or.at>
Sun, 18 Dec 2011 13:20:14 +0000
(14:20 +0100)
Fixes bug 151.
Reviewed-by: Vitor Sessak
libavcodec/acelp_vectors.c
patch
|
blob
|
history
diff --git
a/libavcodec/acelp_vectors.c
b/libavcodec/acelp_vectors.c
index
a44ab8c
..
e6db556
100644
(file)
--- a/
libavcodec/acelp_vectors.c
+++ b/
libavcodec/acelp_vectors.c
@@
-237,6
+237,7
@@
void ff_set_fixed_vector(float *out, const AMRFixed *in, float scale, int size)
int x = in->x[i], repeats = !((in->no_repeat_mask >> i) & 1);
float y = in->y[i] * scale;
+ if (in->pitch_lag > 0)
do {
out[x] += y;
y *= in->pitch_fac;
@@
-252,6
+253,7
@@
void ff_clear_fixed_vector(float *out, const AMRFixed *in, int size)
for (i=0; i < in->n; i++) {
int x = in->x[i], repeats = !((in->no_repeat_mask >> i) & 1);
+ if (in->pitch_lag > 0)
do {
out[x] = 0.0;
x += in->pitch_lag;