[FFmpeg-devel] [PATCH] avformat/concatdec: pass the interrupt callback on

Zhang Rui bbcallen at gmail.com
Sat Feb 8 05:17:42 CET 2014


---
 libavformat/concatdec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index 86f82e0..cfd56e3 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -132,9 +132,16 @@ static int open_file(AVFormatContext *avf, unsigned fileno)
 
     if (cat->avf)
         avformat_close_input(&cat->avf);
+
+    cat->avf = avformat_alloc_context();
+    if (!cat->avf)
+        return -1;
+
+    cat->avf->interrupt_callback = avf->interrupt_callback;
     if ((ret = avformat_open_input(&cat->avf, file->url, NULL, NULL)) < 0 ||
         (ret = avformat_find_stream_info(cat->avf, NULL)) < 0) {
         av_log(avf, AV_LOG_ERROR, "Impossible to open '%s'\n", file->url);
+        avformat_close_input(&cat->avf);
         return ret;
     }
     cat->cur_file = file;
-- 
1.8.3.4



More information about the ffmpeg-devel mailing list