From 901b0f1a219e96d008c801dbd99bb21aae0aea4e Mon Sep 17 00:00:00 2001
From: Timo Rothenpieler <timo@rothenpieler.org>
Date: Mon, 11 Apr 2016 19:27:18 +0200
Subject: [PATCH] avformat/concatdec: Use correct stream count on close

---
 libavformat/concatdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index 50d6689413b..e3418e18e80 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -364,7 +364,7 @@ static int concat_read_close(AVFormatContext *avf)
 
     for (i = 0; i < cat->nb_files; i++) {
         av_freep(&cat->files[i].url);
-        for (j = 0; j < cat->avf->nb_streams; j++) {
+        for (j = 0; j < cat->files[i].nb_streams; j++) {
             if (cat->files[i].streams[j].avctx)
                 avcodec_free_context(&cat->files[i].streams[j].avctx);
             if (cat->files[i].streams[j].bsf)
-- 
GitLab