[gstreamer-bugs] [Bug 475723] cleanup static caps correctly

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Sep 11 05:28:30 PDT 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=475723

  GStreamer | gstreamer (core) | Ver: HEAD CVS

Tim-Philipp Müller changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #95323|none                        |reviewed
               Flag|                            |




------- Comment #3 from Tim-Philipp Müller  2007-09-11 12:28 UTC -------
I know I'm just nitpicking, but here it goes:

 - I'm not sure if the g_atomic_int_get() + g_atomic_int_set()
   really buy you anything here.  It's still racy, isn't it?
   (Also, shouldn't the > 0 check be a == 1 check? Otherwise
   you're freeing the caps structures knowing that something
   else is still using them, no?).
   If we really want to cater for thread-safety and the possibility
   that other pieces of code might still hold a ref to the caps
   embedded in the GstStaticCaps within the GstStaticPadTemplate,
   then we need something more clever than what we're currently
   doing anyway, don't we? Given that we're freeing the template
   memory which in effect frees the memory the GstCaps point to
   (if I'm not mistaken) ...

 - I somehow feel that code that meddles with internal caps
   structure fields belongs into gstcaps.c. Maybe something
   like __gst_static_caps_template_clear()? Same for the
   static pad template really, but then that's more a matter
   of taste/personal preference in the end :)


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=475723.




More information about the Gstreamer-bugs mailing list