From 038f3a173f59c9fc3396aa38e7972661da7ca504 Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Thu, 29 Jan 2015 17:55:32 +0800 Subject: [PATCH] avformat/concatdec: avoid NULL dereference when failed to open file. Reviewed-by: Nicolas George Signed-off-by: Michael Niedermayer --- libavformat/concatdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index e109524de1..f07cfd7e8f 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) {