GNOME Bugzilla – Bug 333663
[patch] unref the result of gst_pad_get_parent
Last modified: 2006-03-07 13:09:34 UTC
The GstElement returned by gst_pad_get_parent needs to be unreffed after use, only half of the elements in gst-plugins-base do it, the attached patch tries to solve that. I can't compile gst-plugins-base atm, and it doesn't seem to be caused by my patch, so there may have some mistakes left...
Created attachment 60798 [details] [review] unref result of gst_pad_get_parent You should review that patch carefully since I may have made some stupid mistakes ;)
Thanks, committed most of the gst_pad_get_parent() leaks. Rewrote some stuff (e.g. to use GST_DEBUG_PAD_NAME convenience macro). Skipped pad template bits, which are covered by bug #333510, and gstv4ljpegsrc bits (as v4ljpegsrc hasn't been ported yet): 2006-03-07 Tim-Philipp Müller <tim at centricular dot net> * ext/libvisual/visual.c: (gst_visual_getcaps), (gst_visual_src_setcaps), (gst_visual_sink_setcaps): * ext/ogg/gstoggmux.c: (gst_ogg_mux_sinkconnect): * ext/vorbis/vorbisenc.c: (gst_vorbisenc_convert_src), (gst_vorbisenc_convert_sink): * gst-libs/gst/audio/audio.c: (gst_audio_frame_byte_size), (gst_audio_duration_from_pad_buffer): * gst-libs/gst/audio/gstaudiofilter.c: (gst_audio_filter_link), (gst_audio_filter_chain): * gst-libs/gst/rtp/gstbasertpdepayload.c: (gst_base_rtp_depayload_setcaps): * gst-libs/gst/video/video.c: (gst_video_frame_rate), (gst_video_get_size): * gst/audiorate/gstaudiorate.c: (gst_audio_rate_setcaps): Don't leak references returned by gst_pad_get_parent() (#333663, based on patch by: Christophe Fergeau).