<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">Le 17 janv. 2017 4:53 PM, "killerrats" <<a href="mailto:koreysjunkmail@gmail.com">koreysjunkmail@gmail.com</a>> a écrit :<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I created some GstElements but when I go to unref them in the end it says<br>
*"GStreamer-CRITICAL **: gst_object_unref: assertion '((GObject *)<br>
object)->ref_count > 0' failed"*<br>
<br>
I checked to see if its null and it isn't but don't understand why it says<br>
this. It's only saying about:<br>
<br>
*GstElement* RecBin*,** source*,** q1*,** rtpdepay*,** parse*,** vtee*,**<br>
q2*,** audioRtpDepay*<br>
,** audioParse*,** audioDec*,** atee*;<br>
*GstElement* q3*,** q4*,** mux*,** appsink*;<br>
<br>
that are in the class.<br>
<br>
what I do is this steps:<br>
<br>
1. setup gstelements<br>
2. link them up<br>
3. start to play<br>
when I stop the pipeline<br>
1. null pipeline, unlink them, remove pads<br>
2. unref the gstelements *(This is where it errors out)*<br>
3. unref pipeline.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">When you add an element to a pipeline, you give the pipeline ownership. No need to unref these elements, the pipeline will do that for you.</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div></div>