GNOME Bugzilla – Bug 513964
[GstPad] gst_pad_get_caps don't return a copy of the caps
Last modified: 2008-02-07 20:46:24 UTC
the function gst_pad_get_caps promises in the documentation: "Returns : a newly allocated copy of the GstCaps of this pad. MT safe." However in the case that there is are no caps on this pad, we get the caps from the template. This caps are not copied but only reffed. (gstpad.c:2011)
Created attachment 104279 [details] [review] add gst_caps_make_writable Be sure that we have copies of the caps
Log message: * gst/gstpad.c: * tests/check/gst/gstpad.c: Be sure that we have a new copy of the caps and not reffed caps from a template
I was thinking of changing the docs instead. Making a copy instead of _ref() introduces unneeded overhead.