diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-09-22 19:09:39 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-09-23 17:02:25 +0300 |
commit | 65a56a10bb1cb79b10d5ff4306f9c8575e728d31 (patch) | |
tree | b3aa065bb0cac3a615a025631ca2bc571f98be53 | |
parent | 96c0aebeaeb6faf6f285e7e4b7f043ffdcd0f8ec (diff) |
FFmpeg: Solve memory leak happening on encoding video
-rw-r--r-- | source/blender/blenkernel/intern/writeffmpeg.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index edda852a032..bc734a9a551 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) { |