Skip to content

Commit

Permalink
Fix for ros-drivers#243
Browse files Browse the repository at this point in the history
  • Loading branch information
vineet131 committed Nov 24, 2023
1 parent f95f9c8 commit 922389a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sound_play/scripts/soundplay_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
try:
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject as GObject
from gi.repository import GLib as GLib
from gi.repository import Gst as Gst
except Exception:
str = """
Expand Down Expand Up @@ -326,9 +326,8 @@ def execute_cb(self, data):
def __init__(self):
Gst.init(None)

# Start gobject thread to receive gstreamer messages
GObject.threads_init()
self.g_loop = threading.Thread(target=GObject.MainLoop().run)
# Start glib thread to receive gstreamer messages
self.g_loop = threading.Thread(target=GLib.MainLoop().run)
self.g_loop.daemon = True
self.g_loop.start()

Expand Down

0 comments on commit 922389a

Please sign in to comment.