From b5f84c0637accead6ad2ccda84b7aae7ddeb87b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 18 Aug 2009 08:39:02 +0200 Subject: [PATCH] playsink: If a custom text sink is used, send events to it too Before, SEEK events would be sent to the video sink, which wouldn't be linked in any way to the subtitle part of the pipeline and subparse would never see the SEEK event. This would then seek the audio/video but the subtitles would continue from the old position instead. Fixes bug #591664. --- gst/playback/gstplaysink.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index 0a65a4f4b3..fcf83dae6f 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -2385,6 +2385,15 @@ gst_play_sink_send_event_to_sink (GstPlaySink * playsink, GstEvent * event) { gboolean res = TRUE; + if (playsink->textchain && playsink->textchain->sink) { + gst_event_ref (event); + if ((res = gst_element_send_event (playsink->textchain->chain.bin, event))) { + GST_DEBUG_OBJECT (playsink, "Sent event succesfully to text sink"); + } else { + GST_DEBUG_OBJECT (playsink, "Event failed when sent to text sink"); + } + } + if (playsink->videochain) { gst_event_ref (event); if ((res = gst_element_send_event (playsink->videochain->chain.bin, event))) { @@ -2401,6 +2410,7 @@ gst_play_sink_send_event_to_sink (GstPlaySink * playsink, GstEvent * event) } GST_DEBUG_OBJECT (playsink, "Event failed when sent to audio sink"); } + done: gst_event_unref (event); return res;