diff mbox

[FFmpeg-devel,2/2] avformat/options: Simplify loglevel initialization in io_open_default()

Message ID 20170603233803.17416-2-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer June 3, 2017, 11:38 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/options.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/libavformat/options.c b/libavformat/options.c
index d6d589a0b0..16e3886e4b 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -102,14 +102,11 @@  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;
+    int loglevel = AV_LOG_INFO;
 
     if (!strcmp(url, s->filename) ||
-        !strcmp(s->iformat ? s->iformat->name : s->oformat->name, "image2")
-    ) {
+        !strcmp(s->iformat ? s->iformat->name : 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");