mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-07 20:31:20 +00:00
playsink: Only remove the xoverlay/colorbalance elements when necessary
They are not added again by every code path, e.g. when switching only the deinterlace flag and are missing then. Fixes bug #678763. Conflicts: gst/playback/gstplaysink.c
This commit is contained in:
parent
a44058c12e
commit
c290fabf36
1 changed files with 27 additions and 13 deletions
|
@ -2945,19 +2945,6 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
|
|||
need_text = TRUE;
|
||||
}
|
||||
|
||||
GST_OBJECT_LOCK (playsink);
|
||||
if (playsink->overlay_element)
|
||||
gst_object_unref (playsink->overlay_element);
|
||||
playsink->overlay_element = NULL;
|
||||
|
||||
if (playsink->colorbalance_element) {
|
||||
g_signal_handlers_disconnect_by_func (playsink->colorbalance_element,
|
||||
G_CALLBACK (colorbalance_value_changed_cb), playsink);
|
||||
gst_object_unref (playsink->colorbalance_element);
|
||||
}
|
||||
playsink->colorbalance_element = NULL;
|
||||
GST_OBJECT_UNLOCK (playsink);
|
||||
|
||||
if (((flags & GST_PLAY_FLAG_VIDEO)
|
||||
|| (flags & GST_PLAY_FLAG_NATIVE_VIDEO)) && playsink->video_pad) {
|
||||
/* we have video and we are requested to show it */
|
||||
|
@ -3043,6 +3030,19 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
|
|||
activate_chain (GST_PLAY_CHAIN (playsink->videochain), FALSE);
|
||||
free_chain ((GstPlayChain *) playsink->videochain);
|
||||
playsink->videochain = NULL;
|
||||
|
||||
GST_OBJECT_LOCK (playsink);
|
||||
if (playsink->overlay_element)
|
||||
gst_object_unref (playsink->overlay_element);
|
||||
playsink->overlay_element = NULL;
|
||||
|
||||
if (playsink->colorbalance_element) {
|
||||
g_signal_handlers_disconnect_by_func (playsink->colorbalance_element,
|
||||
G_CALLBACK (colorbalance_value_changed_cb), playsink);
|
||||
gst_object_unref (playsink->colorbalance_element);
|
||||
}
|
||||
playsink->colorbalance_element = NULL;
|
||||
GST_OBJECT_UNLOCK (playsink);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3156,6 +3156,20 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
|
|||
|
||||
if (playsink->video_pad)
|
||||
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->video_pad), NULL);
|
||||
|
||||
GST_OBJECT_LOCK (playsink);
|
||||
if (playsink->overlay_element)
|
||||
gst_object_unref (playsink->overlay_element);
|
||||
playsink->overlay_element = NULL;
|
||||
|
||||
if (playsink->colorbalance_element) {
|
||||
g_signal_handlers_disconnect_by_func (playsink->colorbalance_element,
|
||||
G_CALLBACK (colorbalance_value_changed_cb), playsink);
|
||||
gst_object_unref (playsink->colorbalance_element);
|
||||
}
|
||||
playsink->colorbalance_element = NULL;
|
||||
GST_OBJECT_UNLOCK (playsink);
|
||||
|
||||
}
|
||||
|
||||
if (need_audio) {
|
||||
|
|
Loading…
Reference in a new issue