[FFmpeg-devel] [PATCH] avformat/concatdec: avoid NULL dereference when failed to open file.
Zhang Rui
bbcallen at gmail.com
Thu Jan 29 10:55:32 CET 2015
---
libavformat/concatdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index e109524..f07cfd7 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -482,6 +482,9 @@ static int concat_read_packet(AVFormatContext *avf, AVPacket *pkt)
ConcatStream *cs;
AVStream *st;
+ if (!cat->avf)
+ return AVERROR(EIO);
+
while (1) {
ret = av_read_frame(cat->avf, pkt);
if (ret == AVERROR_EOF) {
--
2.0.0
More information about the ffmpeg-devel
mailing list