GNOME Bugzilla – Bug 339010
segfault/undefined behavior with optional GstCaps args
Last modified: 2006-04-19 12:06:18 UTC
If a GstCaps argument is marked as optional, its value after PyArgs_ParseTupleAndKeywords is currently undefined because we are not initializing the C variable. Attached patch fixes the problem -- the pdflt idiom is taken from upstream.
Created attachment 63859 [details] [review] Patch to fix problem
this patch is sweet, commit ==> NOW <==
2006-04-19 Andy Wingo <wingo@pobox.com> * gst/arg-types.py (GstCapsArg.write_const_param) (GstCapsArg.write_param): If there is a default value, initialize the py_caps variable to NULL. PyArgs_Parse* doesn't touch c variables if the optional arg isn't there. Fixes #339010.