X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Foptions.c;h=9371c72667479066857d4a7d8b24ef207bfb63bc;hb=3d2da6d585509daddcd65f206b1a262c9c78cbce;hp=25a506eef86a6fe1223ccf41f204f207e859a47b;hpb=9c1b09f73ec36b2470074358d343d9df999b4bee;p=ffmpeg diff --git a/libavformat/options.c b/libavformat/options.c index 25a506eef86..9371c726674 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -102,6 +102,18 @@ static const AVClass av_format_context_class = { static int io_open_default(AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options) { + int loglevel; + + if (!strcmp(url, s->filename) || + s->iformat && !strcmp(s->iformat->name, "image2") || + s->oformat && !strcmp(s->oformat->name, "image2") + ) { + loglevel = AV_LOG_DEBUG; + } else + loglevel = AV_LOG_INFO; + + av_log(s, loglevel, "Opening \'%s\' for %s\n", url, flags & AVIO_FLAG_WRITE ? "writing" : "reading"); + #if FF_API_OLD_OPEN_CALLBACKS FF_DISABLE_DEPRECATION_WARNINGS if (s->open_cb)