Demuxers with AVFMT_NOFILE will open a (possibly different) file themselves,
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Fri, 19 Jan 2007 22:52:59 +0000 (22:52 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Fri, 19 Jan 2007 22:52:59 +0000 (22:52 +0000)
so do not probe them if is_opened is set.

Originally committed as revision 7589 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index d541ea04060af499cf7378ba03ef4ecc84b5b5b3..07a483199d53ad0dc0c3a0ff82202fe7072c1da9 100644 (file)
@@ -279,7 +279,7 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened)
     fmt = NULL;
     score_max = 0;
     for(fmt1 = first_iformat; fmt1 != NULL; fmt1 = fmt1->next) {
-        if (!is_opened && !(fmt1->flags & AVFMT_NOFILE))
+        if (!is_opened == !(fmt1->flags & AVFMT_NOFILE))
             continue;
         score = 0;
         if (fmt1->read_probe) {