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
This commit is contained in:
Vineeth T M 2015-07-16 18:17:05 +09:00 committed by Tim-Philipp Müller
parent aeef28ad4a
commit 7d3c7109ac

View file

@ -325,7 +325,10 @@ gst_ffmpegviddec_close (GstFFMpegVidDec * ffmpegdec, gboolean reset)
av_free (ffmpegdec->context->extradata); av_free (ffmpegdec->context->extradata);
ffmpegdec->context->extradata = NULL; ffmpegdec->context->extradata = NULL;
} }
if (ffmpegdec->context->slice_offset) {
g_free (ffmpegdec->context->slice_offset);
ffmpegdec->context->slice_offset = NULL;
}
if (reset) { if (reset) {
if (avcodec_get_context_defaults3 (ffmpegdec->context, if (avcodec_get_context_defaults3 (ffmpegdec->context,
oclass->in_plugin) < 0) { oclass->in_plugin) < 0) {