mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
playsink: verify linking to overlay element
This commit is contained in:
parent
e5f6675ea3
commit
be34d4c78e
1 changed files with 12 additions and 4 deletions
|
@ -1603,10 +1603,18 @@ gen_text_chain (GstPlaySink * playsink)
|
|||
"max-size-bytes", 0, "max-size-time", (gint64) 0,
|
||||
"silent", TRUE, NULL);
|
||||
gst_bin_add (bin, element);
|
||||
gst_element_link_pads_full (element, "src", chain->overlay,
|
||||
"subtitle_sink", GST_PAD_LINK_CHECK_TEMPLATE_CAPS);
|
||||
textsinkpad = gst_element_get_static_pad (element, "sink");
|
||||
srcpad = gst_element_get_static_pad (chain->overlay, "src");
|
||||
if (gst_element_link_pads_full (element, "src", chain->overlay,
|
||||
"subtitle_sink", GST_PAD_LINK_CHECK_TEMPLATE_CAPS)) {
|
||||
textsinkpad = gst_element_get_static_pad (element, "sink");
|
||||
srcpad = gst_element_get_static_pad (chain->overlay, "src");
|
||||
} else {
|
||||
gst_bin_remove (bin, chain->sink);
|
||||
gst_bin_remove (bin, chain->overlay);
|
||||
chain->sink = NULL;
|
||||
chain->overlay = NULL;
|
||||
gst_object_unref (videosinkpad);
|
||||
videosinkpad = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue