mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
encodebin: Make dispose() function safe to be called multiple times
This commit is contained in:
parent
48f584e663
commit
e79749a531
1 changed files with 6 additions and 0 deletions
|
@ -463,22 +463,28 @@ gst_encode_bin_dispose (GObject * object)
|
||||||
|
|
||||||
if (ebin->muxers)
|
if (ebin->muxers)
|
||||||
gst_plugin_feature_list_free (ebin->muxers);
|
gst_plugin_feature_list_free (ebin->muxers);
|
||||||
|
ebin->muxers = NULL;
|
||||||
|
|
||||||
if (ebin->formatters)
|
if (ebin->formatters)
|
||||||
gst_plugin_feature_list_free (ebin->formatters);
|
gst_plugin_feature_list_free (ebin->formatters);
|
||||||
|
ebin->formatters = NULL;
|
||||||
|
|
||||||
if (ebin->encoders)
|
if (ebin->encoders)
|
||||||
gst_plugin_feature_list_free (ebin->encoders);
|
gst_plugin_feature_list_free (ebin->encoders);
|
||||||
|
ebin->encoders = NULL;
|
||||||
|
|
||||||
if (ebin->parsers)
|
if (ebin->parsers)
|
||||||
gst_plugin_feature_list_free (ebin->parsers);
|
gst_plugin_feature_list_free (ebin->parsers);
|
||||||
|
ebin->parsers = NULL;
|
||||||
|
|
||||||
gst_encode_bin_tear_down_profile (ebin);
|
gst_encode_bin_tear_down_profile (ebin);
|
||||||
|
|
||||||
if (ebin->raw_video_caps)
|
if (ebin->raw_video_caps)
|
||||||
gst_caps_unref (ebin->raw_video_caps);
|
gst_caps_unref (ebin->raw_video_caps);
|
||||||
|
ebin->raw_video_caps = NULL;
|
||||||
if (ebin->raw_audio_caps)
|
if (ebin->raw_audio_caps)
|
||||||
gst_caps_unref (ebin->raw_audio_caps);
|
gst_caps_unref (ebin->raw_audio_caps);
|
||||||
|
ebin->raw_audio_caps = NULL;
|
||||||
/* if (ebin->raw_text_caps) */
|
/* if (ebin->raw_text_caps) */
|
||||||
/* gst_caps_unref (ebin->raw_text_caps); */
|
/* gst_caps_unref (ebin->raw_text_caps); */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue