After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 333663 - [patch] unref the result of gst_pad_get_parent
[patch] unref the result of gst_pad_get_parent
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-06 21:24 UTC by Christophe Fergeau
Modified: 2006-03-07 13:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
unref result of gst_pad_get_parent (21.54 KB, patch)
2006-03-06 21:26 UTC, Christophe Fergeau
committed Details | Review

Description Christophe Fergeau 2006-03-06 21:24:55 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...
Comment 1 Christophe Fergeau 2006-03-06 21:26:14 UTC
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 ;)
Comment 2 Tim-Philipp Müller 2006-03-07 13:09:34 UTC
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).