<div dir="ltr"><div>Hi Tim,</div><div>Thanks!!!</div><div>U were right ,app wasn't flushing messages from GstBus, which were holding refs to demuxer.</div><div>using "gst_bus_set_flushing" api I was able to solve this issue.</div>
<div><br></div><div>Regards,</div><div>Lokesh<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 2, 2013 at 8:50 PM, Tim Müller [via GStreamer-devel] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=4663804&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">

        On Mon, 2013-12-02 at 04:16 -0800, lokesh_sharma wrote:
<br><br>Hi,
<br><div><div class='shrinkable-quote'><br>>    For one of my test scenario, I am removing and adding my demuxer element
<br>> in a loop to my pipeline. But each time I remove the demux element from
<br>> pipeline, it's finalize method is not getting called which causes demux
<br>> element to not remove it's sinkpad. I have one event linked to sinkpad of
<br>> demux element which is not getting free as a result of this.
<br>> 
<br>> I use "gst_bin_remove()" api to remove my demuxer.
<br>> 
<br>> I debugged this issue and found that refcount of my demuxer after removing
<br>> it with gst_bin_remove call,comes out to be "6". If I remove and add my
<br>> vidsink too along with demuxer, demux's refcount decreases to 4 but still
<br>> it's finalize is not called.
<br>> 
<br>> can anyone tell me what could be the reason for this behavior.
</div></div></div>Do you have a small sample program / self-contained test case that
<br>demonstrates the issue with one of the existing GStreamer
<br>demuxers/elements?
<br><br>It could be that other objects still holds refs to your demuxer (e.g.
<br>messages on the pipeline bus that haven't been popped/flushed yet).
<br><br>It's also possible that you are leaking refs in your demuxer code
<br>somewhere. Hard to tell without seeing your code.
<br><br>Cheers
<br> -Tim
<br><br>-- 
<br>Tim Müller, Centricular Ltd - <a href="http://www.centricular.com" target="_blank" rel="nofollow" link="external">http://www.centricular.com</a><br><br><br><br><br>_______________________________________________
<br>gstreamer-devel mailing list
<br><a href="http://user/SendEmail.jtp?type=node&node=4663792&i=0" target="_blank" rel="nofollow" link="external">[hidden email]</a>
<br><a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank" rel="nofollow" link="external">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>

        
        
        
        <br>
        <br>
        <hr size="1" color="#cccccc" noshade>
        <div style="font:12px/normal tahoma,geneva,helvetica,arial,sans-serif;color:rgb(68,68,68);font-size-adjust:none;font-stretch:normal">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://gstreamer-devel.966125.n4.nabble.com/Memory-Leaks-while-dynamically-removing-demuxer-from-pipeline-tp4663787p4663792.html" target="_blank" rel="nofollow" link="external">http://gstreamer-devel.966125.n4.nabble.com/Memory-Leaks-while-dynamically-removing-demuxer-from-pipeline-tp4663787p4663792.html</a>
        </div>
        <div style="font:11px/1.5em tahoma,geneva,helvetica,arial,sans-serif;color:rgb(102,102,102);margin-top:0.4em;font-size-adjust:none;font-stretch:normal">
                To start a new topic under GStreamer-devel, email <a href="/user/SendEmail.jtp?type=node&node=4663804&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>
                To unsubscribe from Memory Leaks while dynamically removing demuxer from pipeline, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>

                <a style="font:9px/normal serif;font-size-adjust:none;font-stretch:normal" href="http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" target="_blank" rel="nofollow" link="external">NAML</a>
        </div></blockquote></div><br></div>


        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Memory-Leaks-while-dynamically-removing-demuxer-from-pipeline-tp4663787p4663804.html">Re: Memory Leaks while dynamically removing demuxer from pipeline</a><br/>
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/">GStreamer-devel mailing list archive</a> at Nabble.com.<br/>