|
|
@ -83,9 +83,11 @@ const AVClass ffurl_context_class = { |
|
|
|
}; |
|
|
|
}; |
|
|
|
/*@}*/ |
|
|
|
/*@}*/ |
|
|
|
|
|
|
|
|
|
|
|
static int default_interrupt_cb(void); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if FF_API_OLD_INTERRUPT_CB |
|
|
|
|
|
|
|
static int default_interrupt_cb(void); |
|
|
|
int (*url_interrupt_cb)(void) = default_interrupt_cb; |
|
|
|
int (*url_interrupt_cb)(void) = default_interrupt_cb; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if FF_API_OLD_AVIO |
|
|
|
#if FF_API_OLD_AVIO |
|
|
|
URLProtocol *av_protocol_next(URLProtocol *p) |
|
|
|
URLProtocol *av_protocol_next(URLProtocol *p) |
|
|
@ -441,6 +443,7 @@ int ffurl_get_file_handle(URLContext *h) |
|
|
|
return h->prot->url_get_file_handle(h); |
|
|
|
return h->prot->url_get_file_handle(h); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if FF_API_OLD_INTERRUPT_CB |
|
|
|
static int default_interrupt_cb(void) |
|
|
|
static int default_interrupt_cb(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
@ -452,13 +455,18 @@ void avio_set_interrupt_cb(int (*interrupt_cb)(void)) |
|
|
|
interrupt_cb = default_interrupt_cb; |
|
|
|
interrupt_cb = default_interrupt_cb; |
|
|
|
url_interrupt_cb = interrupt_cb; |
|
|
|
url_interrupt_cb = interrupt_cb; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
int ff_check_interrupt(AVIOInterruptCB *cb) |
|
|
|
int ff_check_interrupt(AVIOInterruptCB *cb) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int ret; |
|
|
|
int ret; |
|
|
|
if (cb && cb->callback && (ret = cb->callback(cb->opaque))) |
|
|
|
if (cb && cb->callback && (ret = cb->callback(cb->opaque))) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
|
|
|
|
#if FF_API_OLD_INTERRUPT_CB |
|
|
|
return url_interrupt_cb(); |
|
|
|
return url_interrupt_cb(); |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
return 0; |
|
|
|
|
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#if FF_API_OLD_AVIO |
|
|
|
#if FF_API_OLD_AVIO |
|
|
|