Re: GStreamer 0.05 and GStreamer::Registry->get_default



On Thu, 2005-12-22 at 14:52 +0100, Quentin wrote:
There seems to be a problem when calling
GStreamer::Registry->get_default from a sub before playing.
I get "(-e:5450): GStreamer-CRITICAL **: gst_registry_find_feature:
assertion `GST_IS_REGISTRY (registry)' failed"
(or even segfault in my app)

Yeah, I can reproduce the bug.  From my point of view, it's a bug in
GStreamer itself:

  http://bugzilla.gnome.org/show_bug.cgi?id=324818

(FYI, here's what happens: When you run your code,
GStreamer::Registry->get_default calls gst_registry_get_default which
returns a floating registry object with refcount 1.  When the Perl
bindings get to it, they ref and sink it, which produces a registry that
still has a refcount of 1 but is not floating anymore.  Now, when you
reach the end of the "test" sub, the lexical $reg is destroyed -- so the
Perl wrappers also release their grip on the registry object, which
means decrementing the refcount.  Since the refcount was 1 before, it
now drops to 0 and the registry is finalized.  Then, when you want to
create a new element, GStreamer complains that it cannot find a usable
default registry.)

-- 
Bye,
-Torsten




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]