[gst-devel] [gst-cvs] ensonic gstreamer: gstreamer/ gstreamer/gst/

Stefan Kost ensonic at hora-obscura.de
Thu Aug 28 23:02:18 CEST 2008


hi,

this 'fix' causes some trouble. The issue is basically that in 
gst/gstpadtemplate.c::465 we now make a copy and I unref the old caps, so that 
we don't leak it. This causes a problem for e.g. ffmpeg which e.g. in 
gstffmpegdemux.c:1652 keep a pointer to the caps, but never refs() it.

It think I should revert my change, but wonder why in the previous change that 
tim applied in gst/gstpadtemplate.c::465 we copy? can't we change it to:
GST_PAD_TEMPLATE_CAPS (object) =
             gst_caps_ref (g_value_get_boxed (value));

but then the leaks in core are back.
4 tests had leaks or errors under valgrind:
  gst/gstpad gst/gstbin gst/gstghostpad elements/tee

If someone could have a look too. Its a bit late here :/

Stefan

ensonic at kemper.freedesktop.org schrieb:
> CVS Root:       /cvs/gstreamer
> Module:         gstreamer
> Changes by:     ensonic
> Date:           Thu Aug 28 2008  12:32:33 UTC
> 
> Log message:
> 	* gst/gstpadtemplate.c:
> 	  The old behaviour was that gst_pad_template_new() takes ownership of
> 	  the caps. As we now call g_object_new() which calls g_object_set() and
> 	  which copies the caps, we have to unref them to not leak them. Fixes
> 	  make valgrid for me.
> 
> Modified files:
>     .               : ChangeLog
>     gst             : gstpadtemplate.c
> 
> Links:
> http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.4043&r2=1.4044
> http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstpadtemplate.c.diff?r1=1.14&r2=1.15
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-cvs mailing list
> gstreamer-cvs at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs





More information about the gstreamer-devel mailing list