playsink: relink text_pad in case of reconfiguration
authorRajat Verma <rajat.verma@st.com>
Mon, 19 Oct 2015 10:02:19 +0000 (15:32 +0530)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 20 Oct 2015 07:37:04 +0000 (10:37 +0300)
In case of reconfiguration, text_pad should be re-connected with
stream synchronizer sink pad. Otherwise we'll leave an unlinked pad around if
there always was a streamsynchronizer text pad.

https://bugzilla.gnome.org/show_bug.cgi?id=756804

gst/playback/gstplaysink.c

index 1685692..6512493 100644 (file)
@@ -3700,13 +3700,13 @@ gst_play_sink_do_reconfigure (GstPlaySink * playsink)
         g_value_unset (&item);
         g_assert (playsink->text_srcpad_stream_synchronizer);
         gst_iterator_free (it);
-
-        gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->text_pad),
-            playsink->text_sinkpad_stream_synchronizer);
-        gst_pad_link_full (playsink->text_srcpad_stream_synchronizer,
-            playsink->textchain->textsinkpad, GST_PAD_LINK_CHECK_NOTHING);
       }
 
+      gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->text_pad),
+          playsink->text_sinkpad_stream_synchronizer);
+      gst_pad_link_full (playsink->text_srcpad_stream_synchronizer,
+          playsink->textchain->textsinkpad, GST_PAD_LINK_CHECK_NOTHING);
+
       if (need_vis || need_video) {
         if (need_vis) {
           GstPad *srcpad;