[Bug 707605] Need "reverse-funnel" element

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Oct 8 14:45:31 CEST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=707605
  GStreamer | gstreamer (core) | git

--- Comment #39 from HoonHee Lee <hoonh83.lee at gmail.com> 2013-10-08 12:45:25 UTC ---
(In reply to comment #38)
> @@ +311,3 @@
> +  if (srcpad != NULL) {
> +    if (GST_OBJECT_REFCOUNT_VALUE (srcpad) > 0)
> +      gst_object_unref (srcpad);
> 
> Never do something like this, if you need it you get the refcounting wrong
> elsewhere.
> => Could you tell me why i am not using GST_OBJECT_REFCOUNT_VALUE() ?
> I think that if I could know refcount of srcpad, then I could call
> gst_object_unref(srcpad)
> Is there any idea for this?

Read about the concepts of refcounting. Either you own a reference and need to
unref or give it away, or you don't and then don't unref or give it away.

=> I am a little bit confusing.
you means that if I have refcount, then I need to unref and give it away?
and if I don't have refcount, then I don't need to unref and give it away?

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list