timeoverlay: fix pad leak

Spotted by Jiri Uncovsky.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3559>
This commit is contained in:
Tim-Philipp Müller 2022-12-11 17:36:53 +00:00
parent 448cb1c2c3
commit 19566c3a06

View file

@ -331,6 +331,7 @@ gst_time_overlay_init (GstTimeOverlay * overlay)
video_sink = gst_element_get_static_pad (GST_ELEMENT (overlay), "video_sink");
overlay->orig_video_event = GST_PAD_EVENTFUNC (video_sink);
gst_pad_set_event_function (video_sink, gst_time_overlay_video_event);
gst_object_unref (video_sink);
}
static void