mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
fakevideosink: Use our pad template to create pad
This commit is contained in:
parent
e4daa2ef43
commit
1e5c117c7c
1 changed files with 3 additions and 1 deletions
|
@ -171,6 +171,7 @@ static void
|
|||
gst_fake_video_sink_init (GstFakeVideoSink * self)
|
||||
{
|
||||
GstElement *child;
|
||||
GstPadTemplate *template = gst_static_pad_template_get (&sink_factory);
|
||||
|
||||
child = gst_element_factory_make ("fakesink", "sink");
|
||||
|
||||
|
@ -184,7 +185,8 @@ gst_fake_video_sink_init (GstFakeVideoSink * self)
|
|||
|
||||
gst_bin_add (GST_BIN (self), child);
|
||||
|
||||
ghost_pad = gst_ghost_pad_new ("sink", sink_pad);
|
||||
ghost_pad = gst_ghost_pad_new_from_template ("sink", sink_pad, template);
|
||||
gst_object_unref (template);
|
||||
gst_element_add_pad (GST_ELEMENT (self), ghost_pad);
|
||||
gst_object_unref (sink_pad);
|
||||
|
||||
|
|
Loading…
Reference in a new issue