From e79749a531c1941d1eebf970da3397be6087672c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 2 Mar 2016 18:47:23 +0200 Subject: [PATCH] encodebin: Make dispose() function safe to be called multiple times --- gst/encoding/gstencodebin.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index baf8171703..55dab2f95b 100644 --- a/gst/encoding/gstencodebin.c +++ b/gst/encoding/gstencodebin.c @@ -463,22 +463,28 @@ gst_encode_bin_dispose (GObject * object) if (ebin->muxers) gst_plugin_feature_list_free (ebin->muxers); + ebin->muxers = NULL; if (ebin->formatters) gst_plugin_feature_list_free (ebin->formatters); + ebin->formatters = NULL; if (ebin->encoders) gst_plugin_feature_list_free (ebin->encoders); + ebin->encoders = NULL; if (ebin->parsers) gst_plugin_feature_list_free (ebin->parsers); + ebin->parsers = NULL; gst_encode_bin_tear_down_profile (ebin); if (ebin->raw_video_caps) gst_caps_unref (ebin->raw_video_caps); + ebin->raw_video_caps = NULL; if (ebin->raw_audio_caps) gst_caps_unref (ebin->raw_audio_caps); + ebin->raw_audio_caps = NULL; /* if (ebin->raw_text_caps) */ /* gst_caps_unref (ebin->raw_text_caps); */