|
|
|
@ -84,11 +84,6 @@ const AVClass ffurl_context_class = { |
|
|
|
|
/*@}*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if FF_API_OLD_INTERRUPT_CB |
|
|
|
|
static int default_interrupt_cb(void); |
|
|
|
|
int (*url_interrupt_cb)(void) = default_interrupt_cb; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
const char *avio_enum_protocols(void **opaque, int output) |
|
|
|
|
{ |
|
|
|
|
URLProtocol **p = opaque; |
|
|
|
@ -350,29 +345,11 @@ int ffurl_get_file_handle(URLContext *h) |
|
|
|
|
return h->prot->url_get_file_handle(h); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if FF_API_OLD_INTERRUPT_CB |
|
|
|
|
static int default_interrupt_cb(void) |
|
|
|
|
{ |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void avio_set_interrupt_cb(int (*interrupt_cb)(void)) |
|
|
|
|
{ |
|
|
|
|
if (!interrupt_cb) |
|
|
|
|
interrupt_cb = default_interrupt_cb; |
|
|
|
|
url_interrupt_cb = interrupt_cb; |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
int ff_check_interrupt(AVIOInterruptCB *cb) |
|
|
|
|
{ |
|
|
|
|
int ret; |
|
|
|
|
if (cb && cb->callback && (ret = cb->callback(cb->opaque))) |
|
|
|
|
return ret; |
|
|
|
|
#if FF_API_OLD_INTERRUPT_CB |
|
|
|
|
return url_interrupt_cb(); |
|
|
|
|
#else |
|
|
|
|
return 0; |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|