Commit 5e2098d9 authored by Zhang Rui's avatar Zhang Rui Committed by Michael Niedermayer

avformat/async: fix interrupt_callback usage and return code

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8fe00dd1
...@@ -75,13 +75,12 @@ static int async_interrupt_callback(void *arg) ...@@ -75,13 +75,12 @@ static int async_interrupt_callback(void *arg)
{ {
URLContext *h = arg; URLContext *h = arg;
Context *c = h->priv_data; Context *c = h->priv_data;
int ret = 0;
if (c->interrupt_callback.callback) { if (c->abort_request)
ret = c->interrupt_callback.callback(c->interrupt_callback.opaque); return 1;
if (!ret)
return ret; if (ff_check_interrupt(&c->interrupt_callback))
} c->abort_request = 1;
return c->abort_request; return c->abort_request;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment