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 f2af40bf2d..36eb14c3a8 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 @@ -148,10 +148,22 @@ 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; } /**