[gstreamermm] restored destroy method, fixed copying slot



commit a7974e126911643ca794bfc4209a1c1eeff11fe0
Author: Marcin Kolny <marcin kolny flytronic pl>
Date:   Tue Mar 11 16:57:16 2014 +0100

    restored destroy method, fixed copying slot

 gstreamer/src/bus.ccg |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gstreamer/src/bus.ccg b/gstreamer/src/bus.ccg
index a9711da..74d3159 100644
--- a/gstreamer/src/bus.ccg
+++ b/gstreamer/src/bus.ccg
@@ -88,14 +88,12 @@ bool Bus::remove_watch(guint id)
 
 void Bus::set_sync_handler(const SlotMessageSync& slot)
 {
-  static SlotMessageSync slot_copy;
-
   // Clear a possibly existing sync handler by calling with 0 before setting
   // a new one (see gst_bus_set_sync_handler docs)
   gst_bus_set_sync_handler(gobj(), 0, 0, 0);
 
-  slot_copy = slot;
-  gst_bus_set_sync_handler(gobj(), &Bus_Message_Sync_gstreamermm_callback, &slot_copy, NULL);
+  SlotMessageSync* slot_copy = new SlotMessageSync(slot);
+  gst_bus_set_sync_handler(gobj(), &Bus_Message_Sync_gstreamermm_callback, slot_copy, 
&Bus_Message_gstreamermm_callback_destroy);
 }
 
 } //namespace Gst


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]