mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-10 10:04:23 +00:00
a2dpsink: unref avdtpsink if state transition failed
If for some reason the avdtpsink element can't go READY then the gsta2dpsink can't either and so should release the ressources it allocates when trying to do so. Fix a leak with the generic/states test. https://bugzilla.gnome.org/show_bug.cgi?id=767161
This commit is contained in:
parent
f615a84646
commit
007c7f9b78
1 changed files with 3 additions and 0 deletions
|
@ -288,6 +288,9 @@ gst_a2dp_sink_change_state (GstElement * element, GstStateChange transition)
|
|||
self->autoconnect, NULL);
|
||||
|
||||
ret = gst_element_set_state (GST_ELEMENT (self->sink), GST_STATE_READY);
|
||||
if (ret == GST_STATE_CHANGE_FAILURE) {
|
||||
g_clear_object (&self->sink);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue