d3d12videosink: Disconnect window's signal on dispose

Same as the commit of 7b69d1758f
but for d3d12videosink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6692>
This commit is contained in:
Seungha Yang 2024-04-19 20:44:44 +09:00
parent 6659bd6362
commit dabce9635d

View file

@ -151,6 +151,7 @@ static void gst_d3d12_videosink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_d3d12_videosink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static void gst_d3d12_video_sink_dispose (GObject * object);
static void gst_d3d12_video_sink_finalize (GObject * object);
static void gst_d3d12_video_sink_set_context (GstElement * element,
GstContext * context);
@ -205,6 +206,7 @@ gst_d3d12_video_sink_class_init (GstD3D12VideoSinkClass * klass)
object_class->set_property = gst_d3d12_videosink_set_property;
object_class->get_property = gst_d3d12_videosink_get_property;
object_class->finalize = gst_d3d12_video_sink_dispose;
object_class->finalize = gst_d3d12_video_sink_finalize;
g_object_class_install_property (object_class, PROP_ADAPTER,
@ -363,6 +365,17 @@ gst_d3d12_video_sink_init (GstD3D12VideoSink * self)
G_CALLBACK (gst_d3d12_video_sink_on_fullscreen), self);
}
static void
gst_d3d12_video_sink_dispose (GObject * object)
{
auto self = GST_D3D12_VIDEO_SINK (object);
auto priv = self->priv;
g_signal_handlers_disconnect_by_data (priv->window, self);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
gst_d3d12_video_sink_finalize (GObject * object)
{