mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
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.
This commit is contained in:
parent
6aa731cb48
commit
b5f84c0637
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue