From 7d3c7109acc2e153f02ecb3f56c530b916a9382e Mon Sep 17 00:00:00 2001 From: Vineeth T M Date: Thu, 16 Jul 2015 18:17:05 +0900 Subject: [PATCH] avviddec: fix slice_offset memory leak In case of real videos, slice_offset is being allocated, but the same is not being freed. https://bugzilla.gnome.org/show_bug.cgi?id=752404 --- ext/libav/gstavviddec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c index 22184f860a..8ebe047d02 100644 --- a/ext/libav/gstavviddec.c +++ b/ext/libav/gstavviddec.c @@ -325,7 +325,10 @@ gst_ffmpegviddec_close (GstFFMpegVidDec * ffmpegdec, gboolean reset) av_free (ffmpegdec->context->extradata); ffmpegdec->context->extradata = NULL; } - + if (ffmpegdec->context->slice_offset) { + g_free (ffmpegdec->context->slice_offset); + ffmpegdec->context->slice_offset = NULL; + } if (reset) { if (avcodec_get_context_defaults3 (ffmpegdec->context, oclass->in_plugin) < 0) {