[FFmpeg-cvslog] mov: free the dv demux context with avformat_free_context()

Anton Khirnov git at videolan.org
Wed Jul 9 23:25:43 CEST 2014


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Jun 19 08:56:24 2014 +0200| [edb1af7c466ebb28bfdb0c076e498e527b43d24f] | committer: Anton Khirnov

mov: free the dv demux context with avformat_free_context()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=edb1af7c466ebb28bfdb0c076e498e527b43d24f
---

 libavformat/mov.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index cc2dc87..fdf9c8d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3040,12 +3040,8 @@ static int mov_read_close(AVFormatContext *s)
     }
 
     if (mov->dv_demux) {
-        for (i = 0; i < mov->dv_fctx->nb_streams; i++) {
-            av_freep(&mov->dv_fctx->streams[i]->codec);
-            av_freep(&mov->dv_fctx->streams[i]);
-        }
-        av_freep(&mov->dv_fctx);
-        av_freep(&mov->dv_demux);
+        avformat_free_context(mov->dv_fctx);
+        mov->dv_fctx = NULL;
     }
 
     av_freep(&mov->trex_data);



More information about the ffmpeg-cvslog mailing list