From b7fa34a279b5633e64093ca12c43f150c21f57a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 18 Aug 2009 11:15:41 +0200 Subject: [PATCH] playsink: Also send SEEK events directly to a subpicture sink --- gst/playback/gstplaysink.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index fcf83dae6f..2a8a09098f 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -2379,6 +2379,8 @@ gst_play_sink_handle_message (GstBin * bin, GstMessage * message) /* Send an event to our sinks until one of them works; don't then send to the * remaining sinks (unlike GstBin) + * Special case: If a subpicture or text sink is set we need to send the event + * to them in case it's source is different from the a/v stream's source. */ static gboolean gst_play_sink_send_event_to_sink (GstPlaySink * playsink, GstEvent * event) @@ -2394,6 +2396,15 @@ gst_play_sink_send_event_to_sink (GstPlaySink * playsink, GstEvent * event) } } + if (playsink->subpchain && playsink->subpchain->sink) { + gst_event_ref (event); + if ((res = gst_element_send_event (playsink->subpchain->chain.bin, event))) { + GST_DEBUG_OBJECT (playsink, "Sent event succesfully to subpicture sink"); + } else { + GST_DEBUG_OBJECT (playsink, "Event failed when sent to subpicture sink"); + } + } + if (playsink->videochain) { gst_event_ref (event); if ((res = gst_element_send_event (playsink->videochain->chain.bin, event))) {