[Bug 768100] ghostpad: invalid ref getting internal pad
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Jun 28 16:01:59 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=768100
--- Comment #9 from Miguel París Díaz <mparisdiaz at gmail.com> ---
(In reply to Sebastian Dröge (slomo) from comment #8)
> (In reply to Miguel París Díaz from comment #7)
> > Review of attachment 330439 [details] [review] [review]:
> >
> > ::: gst/gstghostpad.c
> > @@ +590,3 @@
> > goto parent_failed;
> >
> > + GST_OBJECT_LOCK (internal);
> >
> > gst_ghost_pad_construct is public, so it is not ensured to be only used from
> > gst_ghost_pad_new_full.
> > Moreover:
> > - I prefer having the discipline of managing GST_PROXY_PAD_INTERNAL into
> > the critical section
> > - The lock is also held for the pad var
>
> It's invalid usage of the API otherwise, but I agree that we should take the
> lock here for consistency reasons already. I was just wondering if you were
> getting a problem from that specific code too.
I don't think so, my problem should have happened by the code changed in the
other commit.
>
> > @@ +842,3 @@
> > internal = GST_PROXY_PAD_INTERNAL (gpad);
> >
> > + if (newtarget == internal) {
> >
> > I cannot use g_return_val_if_fail because this check is into the critical
> > section and the lock must be released.
> > Do you want to use g_warning with a specific message?
>
> Or unlock inside the if and then do a g_return_val_if_fail() ;)
OK, I will do it!!
--
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