lavf/concatdec: fix crash in case a file in script cannot be opened
authorStefano Sabatini <stefasab@gmail.com>
Wed, 18 Dec 2013 13:56:36 +0000 (14:56 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Wed, 18 Dec 2013 14:14:58 +0000 (15:14 +0100)
libavformat/concatdec.c

index 428c749ab24890b27990765dc7cc96372b1b9b58..86f82e01ed1337407f46426452f6032e100cd465 100644 (file)
@@ -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);