Gstelement refcount not descreasing to zero lead fd leak

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Gstelement refcount not descreasing to zero lead fd leak

Hi Everyone,

We have requirement of dynamic pipeline where we add webrtc peer on request
and remove once the task done.

We are facing an issue when removing peer from the pipeline.

When we remove the elemtn object, element's refcount not become zero which
leads to not call of finalize & dispose function of child element ( created
when i set state webrtcbin to PLAYING) and hence we observe fd leaks of ICE

below is the code snippest of removal function.

1. Unlinking src & sink pad of elements which are created when we add peer
of webrtc.
2. Make states of element to NULL
3. Remove elements from Pipeline.
4. Unref the objects

Even after following above steps, we see refcount of elements not becomes

Also if i set  stated of pipeline ( which is dynamic pipeline, in which i
add webrtcbin element) to NULL in removal function then all finalize &
dispose functions are called & no fd leak. but i dont want to do that.

Can anyone help me in this case ?

For code reference, our code is based on below examples of webrtc,

Refer the add_peer_to_pipeline function used to add peer &
refer  remove_peer_from_pipeline function used to remove peer. In this
function we added steps 1-4 in addition to that.

Kindly help me in this issue.

Viraj M

Sent from:
gstreamer-devel mailing list
[hidden email]