Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-06-26 00:20:09 +0300
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-06-27 00:04:43 +0300
commit7becc70375deed5e6c3e812f6717af7ef5ad93f5 (patch)
tree348b8c90c69c05b6c6606dbc6005840bdc373ae5 /libavformat/amr.c
parent4ac88ba5487e026bf81da565f97cfcf8f920657d (diff)
lavf/amr: Fix heuristic to avoid detection of repeated bytes.
Diffstat (limited to 'libavformat/amr.c')
-rw-r--r--libavformat/amr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/amr.c b/libavformat/amr.c
index 6cc06bceac..de347058f3 100644
--- a/libavformat/amr.c
+++ b/libavformat/amr.c
@@ -184,12 +184,11 @@ static int amrnb_probe(AVProbeData *p)
while (i < p->buf_size) {
mode = b[i] >> 3 & 0x0F;
if (mode < 9 && (b[i] & 0x4) == 0x4) {
- int last = mode;
+ int last = b[i];
int size = amrnb_packed_size[mode];
while (size--) {
if (b[++i] != last)
break;
- last = b[i];
}
if (size > 0) {
valid++;
@@ -241,12 +240,11 @@ static int amrwb_probe(AVProbeData *p)
while (i < p->buf_size) {
mode = b[i] >> 3 & 0x0F;
if (mode < 10 && (b[i] & 0x4) == 0x4) {
- int last = mode;
+ int last = b[i];
int size = amrwb_packed_size[mode];
while (size--) {
if (b[++i] != last)
break;
- last = b[i];
}
if (size > 0) {
valid++;