aboutsummaryrefslogtreecommitdiff
path: root/libavformat/avio.c
diff options
context:
space:
mode:
authorMartin Storsjö2011-11-07 12:17:50 +0200
committerAnton Khirnov2011-11-18 11:01:16 +0100
commit45f511ece7aaf730d51dff5b086e32bc43fc78ce (patch)
tree120b4bdee31e8869b0d52fac7a3c52fcd7478136 /libavformat/avio.c
parent40972f7c54e013d2da8bf42cb34ab25cfea75eab (diff)
avio: Mark the old interrupt callback mechanism as deprecated
Prepare for removing it at an upcoming major bump.
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r--libavformat/avio.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 9de435e073..4750a9d544 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -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;
+#endif
#if FF_API_OLD_AVIO
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);
}
+#if FF_API_OLD_INTERRUPT_CB
static int default_interrupt_cb(void)
{
return 0;
@@ -452,13 +455,18 @@ void avio_set_interrupt_cb(int (*interrupt_cb)(void))
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
}
#if FF_API_OLD_AVIO