[gst-devel] Re: [gst-cvs] alima gst-plugins-bad: gst-plugins-bad/ gst-plugins-bad/ext/ gst-plugins-bad/ext/xvid/

Andy Wingo wingo at pobox.com
Thu Dec 15 02:34:04 CET 2005


On Wed, 2005-12-14 at 14:41 -0800, Edgard Nicéas Arcoverde Gusmão Lima
wrote:
> xviddec and xvideenc ported to 0.10

Excellent! Only a few things need fixing, mostly leak-related.

1) gst_xviddec_negotiate leaks caps: "caps" is created and not used, so
you should take that out; "one" is created but never unreffed. Make sure
you unref it in all possible exit cases.

2) gst_xviddec_setcaps amd gst_xviddec_chain leak a reference to the
xviddec, via gst_pad_get_parent(). Same for the encoders also. The thing
to remember is that if you call a function like gst_foo_get_bar, and it
returns a refcounted object, you own a reference to the object (and so
you have to release the reference when you are finished).

3) also in setcaps, there is a line like this:
  if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
fps should *always* hold a fraction. Always. No need for this check.

Otherwise the caps negotiation looks a little dodgy, but I'm not so good
with decoders so I don't know. There might be more things but that is
what my eye sees now.

Cheers,
-- 
Andy Wingo
http://wingolog.org/





More information about the gstreamer-devel mailing list