aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Rui <bbcallen@gmail.com>2015-07-22 02:47:23 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-21 21:18:48 +0200
commit5e2098d9064e130e603018c8185f591fbcfd5873 (patch)
treee76fa99fc2d8ea33bc7f68a538f403708324cc35
parent8fe00dd18a4a10c3157b8fae41b5e864f0260951 (diff)
downloadffmpeg-5e2098d9064e130e603018c8185f591fbcfd5873.tar.gz
avformat/async: fix interrupt_callback usage and return code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/async.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavformat/async.c b/libavformat/async.c
index c2df274c7d..54021e7143 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;
}