[FFmpeg-devel,1/2] avformat/avio: make the logic simple

Submitted by Jun Zhao on April 8, 2018, 12:17 a.m.

Details

Message ID a2aa0e7a-7fda-ce65-9cd0-5f283a66f230@gmail.com
State New
Headers show

Commit Message

Jun Zhao April 8, 2018, 12:17 a.m.
From 733dfb98152a7a629e0440f6f807f76c2b2a9584 Mon Sep 17 00:00:00 2001
From: Jun Zhao <mypopydev@gmail.com>
Date: Sun, 8 Apr 2018 08:05:08 +0800
Subject: [PATCH 1/2] avformat/avio: make the logic simple

remove the "ret" to make the code simple and generic.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
---
 libavformat/avio.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavformat/avio.c b/libavformat/avio.c
index 63e82872f7..663789ec02 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -663,8 +663,7 @@  int ffurl_shutdown(URLContext *h, int flags)
 
 int ff_check_interrupt(AVIOInterruptCB *cb)
 {
-    int ret;
-    if (cb && cb->callback && (ret = cb->callback(cb->opaque)))
-        return ret;
+    if (cb && cb->callback)
+        return cb->callback(cb->opaque);
     return 0;
 }