[FFmpeg-devel] [PATCH 1/4] avformat/async: fix interrupt_callback usage and return code

Zhang Rui bbcallen at gmail.com
Tue Jul 21 20:47:23 CEST 2015


---
 libavformat/async.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/libavformat/async.c b/libavformat/async.c
index be02308..0c7f054 100644
--- a/libavformat/async.c
+++ b/libavformat/async.c
@@ -75,13 +75,12 @@ static int async_interrupt_callback(void *arg)
 {
     URLContext *h   = arg;
     Context    *c   = h->priv_data;
-    int         ret = 0;
 
-    if (c->interrupt_callback.callback) {
-        ret = c->interrupt_callback.callback(c->interrupt_callback.opaque);
-        if (!ret)
-            return ret;
-    }
+    if (c->abort_request)
+        return 1;
+
+    if (ff_check_interrupt(&c->interrupt_callback))
+        c->abort_request = 1;
 
     return c->abort_request;
 }
-- 
2.0.0



More information about the ffmpeg-devel mailing list