Signed-off-by: Anton Khirnov <anton@khirnov.net>
url_interrupt_cb = interrupt_cb;
}
+int ff_check_interrupt(AVIOInterruptCB *cb)
+{
+ int ret;
+ if (cb && cb->callback && (ret = cb->callback(cb->opaque)))
+ return ret;
+ return url_interrupt_cb();
+}
+
#if FF_API_OLD_AVIO
int av_url_read_pause(URLContext *h, int pause)
{
*/
int ffurl_register_protocol(URLProtocol *protocol, int size);
+/**
+ * Check if the user has requested to interrup a blocking function
+ * associated with cb.
+ */
+int ff_check_interrupt(AVIOInterruptCB *cb);
+
/* udp.c */
int ff_udp_set_remote_url(URLContext *h, const char *uri);
int ff_udp_get_local_port(URLContext *h);