diff options
author | Martin Storsjö <martin@martin.st> | 2011-11-06 22:10:21 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-11-13 13:07:48 +0100 |
commit | c4a090ddb564b87fd9d6d4f83e0f134a77c96007 (patch) | |
tree | 908c02873d9222ea2be177df8fae493666b155d4 /libavformat/avio.c | |
parent | 6aa0b98fb27ab22bd62a365de44d9f16cc07d03e (diff) | |
download | ffmpeg-c4a090ddb564b87fd9d6d4f83e0f134a77c96007.tar.gz |
avio: Add an internal utility function for checking the new interrupt callback
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r-- | libavformat/avio.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c index 8e1854976e..1964012b1d 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -408,6 +408,14 @@ void avio_set_interrupt_cb(int (*interrupt_cb)(void)) 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) { |