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 94464 - [threads] gst_scheduler_add_scheduler() doesn't ref passed scheduler
[threads] gst_scheduler_add_scheduler() doesn't ref passed scheduler
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.0
Other Linux
: Normal major
: 0.8.9
Assigned To: David Schleef
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-09-29 15:51 UTC by Christian Meyer
Modified: 2005-01-31 15:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (719 bytes, patch)
2005-01-29 16:57 UTC, Ronald Bultje
none Details | Review

Description Christian Meyer 2002-09-29 15:51:31 UTC
gst_scheduler_add_scheduler() doesn't ref the passed GstScheduler which
makes life hard for people who want to write a wrapper and will lead to
inconsistencies in Gstreamer.
Comment 1 Wim Taymans 2003-01-17 20:00:45 UTC
fixed in CVS
Comment 2 Martin Schulze 2003-04-02 19:28:32 UTC
Hm, it seems like you added a circular reference in
gst_scheduler_add_scheduler(GstScheduler *sched, GstScheduler
*sched2). In current cvs the affected lines read:

  gst_object_ref (GST_OBJECT (sched2));
  gst_object_ref (GST_OBJECT (sched));

Did you do this on purpose? The second line seems superfluous.
Comment 3 Martin Schulze 2003-04-02 19:58:02 UTC
gst_scheduler_dispose() would need to set "parent_sched" of all
schedulers in the list "schedulers" to NULL and unreference them,
then. Would it be dangerous to clear the "parent_sched" field?
Comment 4 Thomas Vander Stichele 2004-02-11 18:04:31 UTC
david, any idea what we can do with this ?
Comment 5 Thomas Vander Stichele 2004-08-12 08:45:49 UTC
david, wim, ping
Comment 6 Wim Taymans 2004-12-13 11:55:26 UTC
The circular reference is ok. The dispose method of the parent scheduler should
indeed deref all of the child schedulers, which is a bug. The refcounting
policies for these kind of objects is not very well defined or documented though.
Comment 7 Ronald Bultje 2005-01-29 16:57:57 UTC
Created attachment 36686 [details] [review]
proposed fix

Patch doing what Wim says (dereference all contained schedulers on dispose).
Please review.
Comment 8 Ronald Bultje 2005-01-31 15:43:27 UTC
Applied.