From 4402a8044f4a171179b417dd4660f20507a0bf8f Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Fri, 2 Jun 2023 15:02:57 -0400 Subject: [PATCH] fakesinks: Fix recursive notify loop The proxy callback for the notify::last-message was emiting the signal again on the child, which caused an infinit loop. We could swap the child and the user data to signal to the bin instead, but it was found that proxying this signal was not very useful. Typical use case it to set silent=0 and use deep-notify feature. Proxying that signal just duplicate that output which isn't very useful. Part-of: --- .../gst-plugins-bad/gst/debugutils/gstfakeaudiosink.c | 8 -------- .../gst-plugins-bad/gst/debugutils/gstfakevideosink.c | 8 -------- 2 files changed, 16 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst/debugutils/gstfakeaudiosink.c b/subprojects/gst-plugins-bad/gst/debugutils/gstfakeaudiosink.c index 6a33435265..eb10cf8cc6 100644 --- a/subprojects/gst-plugins-bad/gst/debugutils/gstfakeaudiosink.c +++ b/subprojects/gst-plugins-bad/gst/debugutils/gstfakeaudiosink.c @@ -158,12 +158,6 @@ gst_fake_audio_sink_proxy_preroll_handoff (GstElement * element, buffer, self->sinkpad); } -static void -gst_fake_audio_sink_proxy_last_message (GstElement * element) -{ - g_object_notify_by_pspec ((GObject *) element, pspec_last_message); -} - static void gst_fake_audio_sink_init (GstFakeAudioSink * self) { @@ -192,8 +186,6 @@ gst_fake_audio_sink_init (GstFakeAudioSink * self) self->child = child; - g_signal_connect (child, "notify::last-message", - G_CALLBACK (gst_fake_audio_sink_proxy_last_message), self); g_signal_connect (child, "handoff", G_CALLBACK (gst_fake_audio_sink_proxy_handoff), self); g_signal_connect (child, "preroll-handoff", diff --git a/subprojects/gst-plugins-bad/gst/debugutils/gstfakevideosink.c b/subprojects/gst-plugins-bad/gst/debugutils/gstfakevideosink.c index 2cb683d0aa..7bfe8f2d5e 100644 --- a/subprojects/gst-plugins-bad/gst/debugutils/gstfakevideosink.c +++ b/subprojects/gst-plugins-bad/gst/debugutils/gstfakevideosink.c @@ -214,12 +214,6 @@ gst_fake_video_sink_proxy_handoff (GstElement * element, GstBuffer * buffer, buffer, self->sinkpad); } -static void -gst_fake_video_sink_proxy_last_message (GstElement * element) -{ - g_object_notify_by_pspec ((GObject *) element, pspec_last_message); -} - static void gst_fake_video_sink_proxy_preroll_handoff (GstElement * element, GstBuffer * buffer, GstPad * pad, GstFakeVideoSink * self) @@ -259,8 +253,6 @@ gst_fake_video_sink_init (GstFakeVideoSink * self) self->child = child; - g_signal_connect (child, "notify::last-message", - G_CALLBACK (gst_fake_video_sink_proxy_last_message), self); g_signal_connect (child, "handoff", G_CALLBACK (gst_fake_video_sink_proxy_handoff), self); g_signal_connect (child, "preroll-handoff",