[FFmpeg-soc] [soc]: r5248 - concat/libavformat/concatgen.c

gkovacs subversion at mplayerhq.hu
Mon Aug 24 09:32:47 CEST 2009


Author: gkovacs
Date: Mon Aug 24 09:32:47 2009
New Revision: 5248

Log:
close all child demuxers when read_close is called

Modified:
   concat/libavformat/concatgen.c

Modified: concat/libavformat/concatgen.c
==============================================================================
--- concat/libavformat/concatgen.c	Mon Aug 24 09:30:24 2009	(r5247)
+++ concat/libavformat/concatgen.c	Mon Aug 24 09:32:47 2009	(r5248)
@@ -31,6 +31,7 @@
 
 #include "concatgen.h"
 #include "avformat.h"
+#include "avplaylist.h"
 
 int ff_concatgen_read_packet(AVFormatContext *s,
                              AVPacket *pkt)
@@ -152,10 +153,14 @@ int64_t ff_concatgen_read_timestamp(AVFo
 
 int ff_concatgen_read_close(AVFormatContext *s)
 {
+    int i;
     AVPlaylistContext *ctx = s->priv_data;
-    AVFormatContext *ic = ctx->formatcontext_list[ctx->pe_curidx];
-    if (ic->iformat->read_close)
-        return ic->iformat->read_close(ic);
+    AVFormatContext *ic;
+    for (i = 0; i < ctx->pelist_size; ++i) {
+        ic = ctx->formatcontext_list[i];
+        if (ic->iformat->read_close)
+            return ic->iformat->read_close(ic);
+    }
     return 0;
 }
 


More information about the FFmpeg-soc mailing list