transcoder: Don't leak API bus and GMainLoop
authorEdward Hervey <edward@centricular.com>
Sat, 12 Nov 2022 09:02:53 +0000 (10:02 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Sat, 12 Nov 2022 09:33:51 +0000 (10:33 +0100)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3390>

subprojects/gst-plugins-bad/gst-libs/gst/transcoder/gsttranscoder.c

index b311ad4fbc7aa0f99c40bb5a702043a16abd5bc2..75e27c2e7f725d13961348631660598653c6ac26 100644 (file)
@@ -262,6 +262,7 @@ gst_transcoder_finalize (GObject * object)
   g_free (self->source_uri);
   g_free (self->dest_uri);
   g_cond_clear (&self->cond);
+  gst_object_unref (self->api_bus);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
@@ -942,6 +943,7 @@ _error_cb (RunSyncData * data, GError * error, GstStructure * details)
 
   if (data->loop) {
     g_main_loop_quit (data->loop);
+    g_main_loop_unref (data->loop);
     data->loop = NULL;
   }
 }
@@ -951,6 +953,7 @@ _done_cb (RunSyncData * data)
 {
   if (data->loop) {
     g_main_loop_quit (data->loop);
+    g_main_loop_unref (data->loop);
     data->loop = NULL;
   }
 }