From c723d9a1e0bedd30ae93561230ec73d23a19cf59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 10 Apr 2023 17:59:21 +0100 Subject: [PATCH] avdeinterlace: fix element leak Fixes #2473 Part-of: --- subprojects/gst-libav/ext/libav/gstavdeinterlace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/subprojects/gst-libav/ext/libav/gstavdeinterlace.c b/subprojects/gst-libav/ext/libav/gstavdeinterlace.c index 15159ddf67..2d46c50901 100644 --- a/subprojects/gst-libav/ext/libav/gstavdeinterlace.c +++ b/subprojects/gst-libav/ext/libav/gstavdeinterlace.c @@ -196,10 +196,10 @@ gst_ffmpegdeinterlace_update_passthrough (GstFFMpegDeinterlace * deinterlace) } static gboolean -gst_ffmpegdeinterlace_sink_setcaps (GstPad * pad, GstCaps * caps) +gst_ffmpegdeinterlace_sink_setcaps (GstPad * pad, GstObject * parent, + GstCaps * caps) { - GstFFMpegDeinterlace *deinterlace = - GST_FFMPEGDEINTERLACE (gst_pad_get_parent (pad)); + GstFFMpegDeinterlace *deinterlace = GST_FFMPEGDEINTERLACE (parent); GstStructure *structure = gst_caps_get_structure (caps, 0); const gchar *imode; AVCodecContext *ctx; @@ -260,7 +260,7 @@ gst_ffmpegdeinterlace_sink_event (GstPad * pad, GstObject * parent, GstCaps *caps; gst_event_parse_caps (event, &caps); - ret = gst_ffmpegdeinterlace_sink_setcaps (pad, caps); + ret = gst_ffmpegdeinterlace_sink_setcaps (pad, parent, caps); gst_event_unref (event); break; } @@ -414,7 +414,7 @@ gst_ffmpegdeinterlace_chain (GstPad * pad, GstObject * parent, deinterlace->reconfigure = FALSE; GST_OBJECT_UNLOCK (deinterlace); if ((caps = gst_pad_get_current_caps (deinterlace->srcpad))) { - gst_ffmpegdeinterlace_sink_setcaps (deinterlace->sinkpad, caps); + gst_ffmpegdeinterlace_sink_setcaps (deinterlace->sinkpad, parent, caps); gst_caps_unref (caps); } } else {