mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
playbin2; release refs to volume/mute properties
Release the refs to the volume and mute property elemens before setting the child elements to READY or NULL. Fixes #583318
This commit is contained in:
parent
4fad939053
commit
de06a6adb5
1 changed files with 14 additions and 0 deletions
|
@ -1909,6 +1909,8 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
|
||||||
}
|
}
|
||||||
add_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
add_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
||||||
activate_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
activate_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
||||||
|
playsink->audiochain->volume = NULL;
|
||||||
|
playsink->audiochain->mute = NULL;
|
||||||
free_chain ((GstPlayChain *) playsink->audiochain);
|
free_chain ((GstPlayChain *) playsink->audiochain);
|
||||||
playsink->audiochain = NULL;
|
playsink->audiochain = NULL;
|
||||||
playsink->volume_changed = playsink->mute_changed = FALSE;
|
playsink->volume_changed = playsink->mute_changed = FALSE;
|
||||||
|
@ -1942,6 +1944,8 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
|
||||||
gst_object_unref (playsink->audio_tee_asrc);
|
gst_object_unref (playsink->audio_tee_asrc);
|
||||||
playsink->audio_tee_asrc = NULL;
|
playsink->audio_tee_asrc = NULL;
|
||||||
}
|
}
|
||||||
|
playsink->audiochain->volume = NULL;
|
||||||
|
playsink->audiochain->mute = NULL;
|
||||||
add_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
add_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
||||||
activate_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
activate_chain (GST_PLAY_CHAIN (playsink->audiochain), FALSE);
|
||||||
}
|
}
|
||||||
|
@ -2342,6 +2346,15 @@ gst_play_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
do_async_start (playsink);
|
do_async_start (playsink);
|
||||||
ret = GST_STATE_CHANGE_ASYNC;
|
ret = GST_STATE_CHANGE_ASYNC;
|
||||||
break;
|
break;
|
||||||
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
|
if (playsink->audiochain) {
|
||||||
|
/* remove our links to the mute and volume elements */
|
||||||
|
playsink->audiochain->volume = NULL;
|
||||||
|
playsink->audiochain->mute = NULL;
|
||||||
|
}
|
||||||
|
ret = GST_STATE_CHANGE_SUCCESS;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/* all other state changes return SUCCESS by default, this value can be
|
/* all other state changes return SUCCESS by default, this value can be
|
||||||
* overridden by the result of the children */
|
* overridden by the result of the children */
|
||||||
|
@ -2381,6 +2394,7 @@ gst_play_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
playsink->need_async_start = TRUE;
|
playsink->need_async_start = TRUE;
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
/* remove sinks we added */
|
/* remove sinks we added */
|
||||||
if (playsink->videochain) {
|
if (playsink->videochain) {
|
||||||
activate_chain (GST_PLAY_CHAIN (playsink->videochain), FALSE);
|
activate_chain (GST_PLAY_CHAIN (playsink->videochain), FALSE);
|
||||||
|
|
Loading…
Reference in a new issue