Allow av_find_stream_info() to be aborted.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 23 Feb 2009 02:38:45 +0000 (02:38 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 23 Feb 2009 02:38:45 +0000 (02:38 +0000)
Based on a patch by netgem.

Originally committed as revision 17538 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index 63c77cf..f5bcf89 100644 (file)
@@ -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;i<ic->nb_streams;i++) {
             st = ic->streams[i];