From 1d14361dec7d6fcfaf1ed579ae9a5e8f9d84abab Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 23 Feb 2009 02:38:45 +0000 Subject: [PATCH] Allow av_find_stream_info() to be aborted. Based on a patch by netgem. Originally committed as revision 17538 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 63c77cfe59..f5bcf89081 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2020,6 +2020,11 @@ int av_find_stream_info(AVFormatContext *ic) count = 0; read_size = 0; for(;;) { + if(url_interrupt_cb()){ + ret= AVERROR(EINTR); + break; + } + /* check if one codec still needs to be handled */ for(i=0;inb_streams;i++) { st = ic->streams[i];