mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 00:32:31 +00:00
parent
92fe0bf1e8
commit
233f52fd25
@ -178,7 +178,7 @@ AVInputFormat ff_amr_demuxer = {
|
||||
#if CONFIG_AMRNB_DEMUXER
|
||||
static int amrnb_probe(AVProbeData *p)
|
||||
{
|
||||
int mode, i = 0, valid = 0;
|
||||
int mode, i = 0, valid = 0, invalid = 0;
|
||||
const uint8_t *b = p->buf;
|
||||
|
||||
while (i < p->buf_size) {
|
||||
@ -197,10 +197,11 @@ static int amrnb_probe(AVProbeData *p)
|
||||
}
|
||||
} else {
|
||||
valid = 0;
|
||||
invalid++;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (valid > 100)
|
||||
if (valid > 100 && valid > invalid)
|
||||
return AVPROBE_SCORE_EXTENSION / 2 + 1;
|
||||
return 0;
|
||||
}
|
||||
@ -234,7 +235,7 @@ AVInputFormat ff_amrnb_demuxer = {
|
||||
#if CONFIG_AMRWB_DEMUXER
|
||||
static int amrwb_probe(AVProbeData *p)
|
||||
{
|
||||
int mode, i = 0, valid = 0;
|
||||
int mode, i = 0, valid = 0, invalid = 0;
|
||||
const uint8_t *b = p->buf;
|
||||
|
||||
while (i < p->buf_size) {
|
||||
@ -253,10 +254,11 @@ static int amrwb_probe(AVProbeData *p)
|
||||
}
|
||||
} else {
|
||||
valid = 0;
|
||||
invalid++;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (valid > 100)
|
||||
if (valid > 100 && valid > invalid)
|
||||
return AVPROBE_SCORE_EXTENSION / 2 - 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
// Also please add any ticket numbers that you believe might be affected here
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 58
|
||||
#define LIBAVFORMAT_VERSION_MINOR 11
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
#define LIBAVFORMAT_VERSION_MICRO 101
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
LIBAVFORMAT_VERSION_MINOR, \
|
||||
|
Loading…
Reference in New Issue
Block a user