mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
gst/playback/gstplaybasebin.c: Disconnect signals from decodebins we created before we remove it from playbin, to avo...
Original commit message from CVS: * gst/playback/gstplaybasebin.c: Disconnect signals from decodebins we created before we remove it from playbin, to avoid crashes if the decodebin is eventually disposed after the playbin itself (possible if the app takes a reference on the decodebin). Fixes #536521.
This commit is contained in:
parent
93db55c074
commit
2fdd607e95
2 changed files with 22 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2008-06-04 Michael Smith <msmith@songbirdnest.com>
|
||||||
|
|
||||||
|
* gst/playback/gstplaybasebin.c:
|
||||||
|
Disconnect signals from decodebins we created before we remove it from
|
||||||
|
playbin, to avoid crashes if the decodebin is eventually disposed after
|
||||||
|
the playbin itself (possible if the app takes a reference on the
|
||||||
|
decodebin).
|
||||||
|
Fixes #536521.
|
||||||
|
|
||||||
2008-06-04 Tim-Philipp Müller <tim.muller at collabora co uk>
|
2008-06-04 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||||
|
|
||||||
* gst/typefind/gsttypefindfunctions.c: (aac_type_find),
|
* gst/typefind/gsttypefindfunctions.c: (aac_type_find),
|
||||||
|
|
|
@ -1936,6 +1936,19 @@ remove_decoders (GstPlayBaseBin * bin)
|
||||||
GstElement *decoder = GST_ELEMENT_CAST (walk->data);
|
GstElement *decoder = GST_ELEMENT_CAST (walk->data);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (bin, "removing old decoder element");
|
GST_DEBUG_OBJECT (bin, "removing old decoder element");
|
||||||
|
/* Disconnect all the signal handlers we attached to the decodebin before
|
||||||
|
* we dispose of it */
|
||||||
|
g_signal_handlers_disconnect_by_func (decoder,
|
||||||
|
G_CALLBACK (decodebin_element_added_cb), bin);
|
||||||
|
g_signal_handlers_disconnect_by_func (decoder,
|
||||||
|
G_CALLBACK (decodebin_element_removed_cb), bin);
|
||||||
|
g_signal_handlers_disconnect_by_func (decoder,
|
||||||
|
G_CALLBACK (new_decoded_pad), bin);
|
||||||
|
g_signal_handlers_disconnect_by_func (decoder,
|
||||||
|
G_CALLBACK (no_more_pads), bin);
|
||||||
|
g_signal_handlers_disconnect_by_func (decoder,
|
||||||
|
G_CALLBACK (unknown_type), bin);
|
||||||
|
|
||||||
gst_element_set_state (decoder, GST_STATE_NULL);
|
gst_element_set_state (decoder, GST_STATE_NULL);
|
||||||
gst_bin_remove (GST_BIN_CAST (bin), decoder);
|
gst_bin_remove (GST_BIN_CAST (bin), decoder);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue