]> git.sesse.net Git - ffmpeg/commitdiff
Revert needless API change in 05e84c95.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Wed, 22 Jun 2011 16:25:49 +0000 (18:25 +0200)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Wed, 22 Jun 2011 19:22:25 +0000 (21:22 +0200)
When providing a custom AVIOContex for a AVFMT_NOFILE format
only print a warning instead of erroring out.
This allows the code to work with older MPlayer versions that
just always set pb out of laziness.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
libavformat/utils.c

index cd90480be644ace121777988dfad880ae748f2e1..e0a5455d758f5ac9387fe96ba631f37f133c70e5 100644 (file)
@@ -591,7 +591,8 @@ static int init_input(AVFormatContext *s, const char *filename)
         if (!s->iformat)
             return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0);
         else if (s->iformat->flags & AVFMT_NOFILE)
-            return AVERROR(EINVAL);
+            av_log(s, AV_LOG_WARNING, "Custom AVIOContext makes no sense and "
+                                      "will be ignored with AVFMT_NOFILE format.\n");
         return 0;
     }