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:Frediano Ziglio <freddy77@gmail.com> Acked-by:
Vivek Kasireddy <vivek.kasireddy@intel.com>
Loading
Please register or sign in to comment