mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 01:02:33 +00:00
lavf: do not prematurely accept a format with low score in init_input()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b47396b614
commit
317505b566
@ -481,6 +481,7 @@ static int init_input(AVFormatContext *s, const char *filename, AVDictionary **o
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
AVProbeData pd = {filename, NULL, 0};
|
AVProbeData pd = {filename, NULL, 0};
|
||||||
|
int score = AVPROBE_SCORE_RETRY;
|
||||||
|
|
||||||
if (s->pb) {
|
if (s->pb) {
|
||||||
s->flags |= AVFMT_FLAG_CUSTOM_IO;
|
s->flags |= AVFMT_FLAG_CUSTOM_IO;
|
||||||
@ -493,7 +494,7 @@ static int init_input(AVFormatContext *s, const char *filename, AVDictionary **o
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( (s->iformat && s->iformat->flags & AVFMT_NOFILE) ||
|
if ( (s->iformat && s->iformat->flags & AVFMT_NOFILE) ||
|
||||||
(!s->iformat && (s->iformat = av_probe_input_format(&pd, 0))))
|
(!s->iformat && (s->iformat = av_probe_input_format2(&pd, 0, &score))))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if ((ret = avio_open2(&s->pb, filename, AVIO_FLAG_READ | s->avio_flags,
|
if ((ret = avio_open2(&s->pb, filename, AVIO_FLAG_READ | s->avio_flags,
|
||||||
|
Loading…
Reference in New Issue
Block a user