From 723bdd2514f589d59271766397262a573d94eecf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 13 Aug 2022 12:24:37 +0300 Subject: [PATCH] player: Don't leak wrapped video info Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1373 Part-of: --- .../gst-libs/gst/player/gstplayer-media-info.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/player/gstplayer-media-info.c b/subprojects/gst-plugins-bad/gst-libs/gst/player/gstplayer-media-info.c index f2af40b..36eb14c 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/player/gstplayer-media-info.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/player/gstplayer-media-info.c @@ -149,9 +149,21 @@ gst_player_video_info_init (G_GNUC_UNUSED GstPlayerVideoInfo * info) } static void +gst_player_video_info_finalize (GObject * object) +{ + GstPlayerVideoInfo *info = GST_PLAYER_VIDEO_INFO (object); + + g_clear_object (&info->info); + + G_OBJECT_CLASS (gst_player_video_info_parent_class)->finalize (object); +} + +static void gst_player_video_info_class_init (G_GNUC_UNUSED GstPlayerVideoInfoClass * klass) { - /* nothing to do here */ + GObjectClass *gobject_class = (GObjectClass *) klass; + + gobject_class->finalize = gst_player_video_info_finalize; } /** -- 2.7.4