Memory Leaks while dynamically removing demuxer from pipeline

Tim Müller tim at centricular.com
Mon Dec 2 04:29:02 PST 2013


On Mon, 2013-12-02 at 04:16 -0800, lokesh_sharma wrote:

Hi,

>    For one of my test scenario, I am removing and adding my demuxer element
> in a loop to my pipeline. But each time I remove the demux element from
> pipeline, it's finalize method is not getting called which causes demux
> element to not remove it's sinkpad. I have one event linked to sinkpad of
> demux element which is not getting free as a result of this.
> 
> I use "gst_bin_remove()" api to remove my demuxer.
> 
> I debugged this issue and found that refcount of my demuxer after removing
> it with gst_bin_remove call,comes out to be "6". If I remove and add my
> vidsink too along with demuxer, demux's refcount decreases to 4 but still
> it's finalize is not called.
> 
> can anyone tell me what could be the reason for this behavior.

Do you have a small sample program / self-contained test case that
demonstrates the issue with one of the existing GStreamer
demuxers/elements?

It could be that other objects still holds refs to your demuxer (e.g.
messages on the pipeline bus that haven't been popped/flushed yet).

It's also possible that you are leaking refs in your demuxer code
somewhere. Hard to tell without seeing your code.

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com






More information about the gstreamer-devel mailing list