Memory Leaks while dynamically removing demuxer from pipeline

lokesh_sharma lokeshkumar.222 at gmail.com
Mon Dec 2 20:57:39 PST 2013


On Tue, Dec 3, 2013 at 10:25 AM, lokesh kumar <lokeshkumar.222 at gmail.com>wrote:

> Hi Tim,
> Thanks!!!
> U were right ,app wasn't flushing messages from GstBus, which were holding
> refs to demuxer.
> using "gst_bus_set_flushing" api I was able to solve this issue.
>
> Regards,
> Lokesh
>
>
> On Mon, Dec 2, 2013 at 8:50 PM, Tim Müller [via GStreamer-devel] <
> ml-node+s966125n4663792h46 at n4.nabble.com> wrote:
>
>> 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
>>
>>
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>>
>>
>
> Hi Tim,
Thanks!!!
U were right ,app wasn't flushing messages from GstBus, which were holding
refs to demuxer.
using "gst_bus_set_flushing" api I was able to solve this issue.

P.S sry for top post .
Regards,
Lokesh




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Memory-Leaks-while-dynamically-removing-demuxer-from-pipeline-tp4663787p4663805.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131202/9bf3768c/attachment.html>


More information about the gstreamer-devel mailing list