Skip to content
Snippets Groups Projects
Commit d29a0a04 authored by Frediano Ziglio's avatar Frediano Ziglio
Browse files

gstreamer: Fix leak using GstBus watch


This patch fixes a leak due to not freeing GstBus watch.
The watch is attached (as GSource) to the main loop and retains
a pointer to the bus so we need to remove it to release the bus
when we release the pipeline.
This was detected forcibly creating and destroying lot of streams.
After a while the client program consumed all file descriptors
and stopped working. This as GstBus retains a GPoll which,
under Unix, uses 2 file descriptors.
For some reasons using gst_pipeline_get_bus again in free_pipeline
do not fix entirely the leak so keep a pointer to the exact
bus we set our watch on.

Signed-off-by: default avatarFrediano Ziglio <freddy77@gmail.com>
Acked-by: default avatarVivek Kasireddy <vivek.kasireddy@intel.com>
parent a5ff1b14
No related branches found
No related tags found
No related merge requests found
Pipeline #1026973 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment