mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
playsink: Set ts-offset to text sink.
Find right text sink to set the ts-offset.
This commit is contained in:
parent
3f63295280
commit
3aa1437ae4
1 changed files with 6 additions and 1 deletions
|
@ -4058,13 +4058,18 @@ update_text_offset (GstPlaySink * playsink)
|
|||
{
|
||||
gint64 text_offset;
|
||||
GstPlayTextChain *tchain;
|
||||
GstElement *elem;
|
||||
|
||||
text_offset = playsink->text_offset;
|
||||
tchain = (GstPlayTextChain *) playsink->textchain;
|
||||
|
||||
if (tchain) {
|
||||
if (tchain->sink) {
|
||||
g_object_set (tchain->sink, "ts-offset", text_offset, NULL);
|
||||
elem =
|
||||
gst_play_sink_find_property_sinks (playsink, tchain->sink,
|
||||
"ts-offset", G_TYPE_INT64);
|
||||
if (elem)
|
||||
g_object_set (elem, "ts-offset", text_offset, NULL);
|
||||
} else if (tchain->overlay) {
|
||||
g_object_set (tchain->overlay, "subtitle-ts-offset", text_offset, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue