1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/async: fix interrupt_callback usage and return code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Zhang Rui 2015-07-22 02:47:23 +08:00 committed by Michael Niedermayer
parent 8fe00dd18a
commit 5e2098d906

View File

@ -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;
} }