[Bf-blender-cvs] [65a56a1] blender-v2.76-release: FFmpeg: Solve memory leak happening on encoding video

Sergey Sharybin noreply at git.blender.org
Wed Sep 23 16:12:18 CEST 2015


Commit: 65a56a10bb1cb79b10d5ff4306f9c8575e728d31
Author: Sergey Sharybin
Date:   Tue Sep 22 21:09:39 2015 +0500
Branches: blender-v2.76-release
https://developer.blender.org/rB65a56a10bb1cb79b10d5ff4306f9c8575e728d31

FFmpeg: Solve memory leak happening on encoding video

===================================================================

M	source/blender/blenkernel/intern/writeffmpeg.c

===================================================================

diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index edda852..bc734a9 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -1234,15 +1234,6 @@ static void end_ffmpeg_impl(FFMpegContext *context, int is_autosplit)
 		context->video_stream = 0;
 	}
 
-	
-	/* Close the output file */
-	if (context->outfile) {
-		for (i = 0; i < context->outfile->nb_streams; i++) {
-			if (&context->outfile->streams[i]) {
-				av_freep(&context->outfile->streams[i]);
-			}
-		}
-	}
 	/* free the temp buffer */
 	if (context->current_frame) {
 		delete_picture(context->current_frame);
@@ -1254,7 +1245,7 @@ static void end_ffmpeg_impl(FFMpegContext *context, int is_autosplit)
 		}
 	}
 	if (context->outfile) {
-		av_free(context->outfile);
+		avformat_free_context(context->outfile);
 		context->outfile = 0;
 	}
 	if (context->audio_input_buffer) {




More information about the Bf-blender-cvs mailing list