Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-10-14 19:56:48 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-10-14 19:56:48 +0400
commite3e21a268324df11861e96299ffb16830b5075b9 (patch)
tree364953c6d75d7a5a05dc71d3cef7bab7999589dc /source/blender/imbuf/intern/indexer.c
parentac9f3e33d5ba039615a632ee0cf0ed3bbfacb799 (diff)
Fix #37043: bpy.ops.sequencer.rebuild_proxy() don't release memory
Diffstat (limited to 'source/blender/imbuf/intern/indexer.c')
-rw-r--r--source/blender/imbuf/intern/indexer.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 93324b94cdc..49a40c461ac 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -656,7 +656,6 @@ static int add_to_proxy_output_ffmpeg(
static void free_proxy_output_ffmpeg(struct proxy_output_ctx *ctx,
int rollback)
{
- int i;
char fname[FILE_MAX];
char fname_tmp[FILE_MAX];
@@ -674,18 +673,12 @@ static void free_proxy_output_ffmpeg(struct proxy_output_ctx *ctx,
avcodec_close(ctx->c);
- for (i = 0; i < ctx->of->nb_streams; i++) {
- if (&ctx->of->streams[i]) {
- av_freep(&ctx->of->streams[i]);
- }
- }
-
if (ctx->of->oformat) {
if (!(ctx->of->oformat->flags & AVFMT_NOFILE)) {
avio_close(ctx->of->pb);
}
}
- av_free(ctx->of);
+ avformat_free_context(ctx->of);
MEM_freeN(ctx->video_buffer);
@@ -854,6 +847,9 @@ static void index_rebuild_ffmpeg_finish(FFmpegIndexBuilderContext *context, int
}
}
+ avcodec_close(context->iCodecCtx);
+ avformat_close_input(&context->iFormatCtx);
+
MEM_freeN(context);
}