diff mbox

[FFmpeg-devel,1/2] avformat/options: Remove one special case in io_open_default()

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

Commit Message

Michael Niedermayer June 3, 2017, 11:38 p.m. UTC
This simplifies the code and reduces clutter.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/options.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/libavformat/options.c b/libavformat/options.c
index 9371c72667..d6d589a0b0 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -105,8 +105,7 @@  static int io_open_default(AVFormatContext *s, AVIOContext **pb,
     int loglevel;
 
     if (!strcmp(url, s->filename) ||
-        s->iformat && !strcmp(s->iformat->name, "image2") ||
-        s->oformat && !strcmp(s->oformat->name, "image2")
+        !strcmp(s->iformat ? s->iformat->name : s->oformat->name, "image2")
     ) {
         loglevel = AV_LOG_DEBUG;
     } else