[FFmpeg-devel] [PATCH] lavf/concatdec: fix crash in case a file in script cannot be opened

Stefano Sabatini stefasab at gmail.com
Wed Dec 18 15:00:23 CET 2013


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

diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index 428c749..86f82e0 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -279,6 +279,9 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt)
             (ret = open_next_file(avf)) < 0)
             break;
     }
+    if (ret < 0)
+        return ret;
+
     delta = av_rescale_q(cat->cur_file->start_time - cat->avf->start_time,
                          AV_TIME_BASE_Q,
                          cat->avf->streams[pkt->stream_index]->time_base);
-- 
1.8.1.2



More information about the ffmpeg-devel mailing list