After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 526044 - Crash if there is more than one watcher for a GstBus
Crash if there is more than one watcher for a GstBus
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-03 20:21 UTC by Olivier Crête
Modified: 2008-10-13 09:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to GstBus to only allow one watcher (2.75 KB, patch)
2008-04-03 20:22 UTC, Olivier Crête
committed Details | Review

Description Olivier Crête 2008-04-03 20:21:49 UTC
a GstBus can only have one watcher on a GMainloop because the dispatch function pops the GstMessage from the bus, so the second watcher may get a NULL (or a different message). Imho, having non-signal watches should simply be deprecated.. But anyways, I'm attaching a patch that keeps track of watches and only allows one to be set.
Comment 1 Olivier Crête 2008-04-03 20:22:37 UTC
Created attachment 108568 [details] [review]
Patch to GstBus to only allow one watcher
Comment 2 Sebastian Dröge (slomo) 2008-10-13 09:22:19 UTC
2008-10-13  Sebastian Dröge  <sebastian.droege@collabora.co.uk>

	Base on Patch by: Olivier Crete <tester at tester dot ca>

	* gst/gstbus.c: (gst_bus_source_finalize),
	(gst_bus_add_watch_full), (gst_bus_add_signal_watch_full):
	Only allow one bus watch to be set at a time. This is necessary
	because the dispatcher pops the message from the bus and the second
	watcher will then get NULL or the next message (and the first won't
	get this next message then, etc). If more than one "watcher" is
	required signal watches should be used. Fixes bug #526044.