diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-10 21:41:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-10 21:41:20 +0200 |
commit | 317505b56691ca7b50374181c437859e992311f9 (patch) | |
tree | 7e5c66085152686a1f250682a0d5f89acf405726 | |
parent | b47396b6143c3ccdc1bd40e3d6ca6147a9cceb17 (diff) | |
download | ffmpeg-317505b56691ca7b50374181c437859e992311f9.tar.gz |
lavf: do not prematurely accept a format with low score in init_input()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 6d7290b27a..f0fbb53c17 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -481,6 +481,7 @@ static int init_input(AVFormatContext *s, const char *filename, AVDictionary **o { int ret; AVProbeData pd = {filename, NULL, 0}; + int score = AVPROBE_SCORE_RETRY; if (s->pb) { 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) || - (!s->iformat && (s->iformat = av_probe_input_format(&pd, 0)))) + (!s->iformat && (s->iformat = av_probe_input_format2(&pd, 0, &score)))) return 0; if ((ret = avio_open2(&s->pb, filename, AVIO_FLAG_READ | s->avio_flags, |