Segmentation fault when removing src or sink from the pipeline using "gst_bin_remove()"

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Segmentation fault when removing src or sink from the pipeline using "gst_bin_remove()"

658 次查看
dilna
Contributor II

Hi

we are trying to make a gstreamer application to switch between a compositor and single camera view. By switching between the pipelines in the program.

Each pipeline are prepared by factory making the gstreamer plugins like src(v4l2src), filter, sink(waylandsink) and linking them using gst_element_link_many function.

At the time of switching we are facing increase in file pointers(fd) corresponding to the gstreamer objects. We tried to handle it by removing the src and sink elements using the function shown below.
gst_bin_remove(GST_BIN (Compositor->pipeline), Compositor->src);
gst_bin_remove(GST_BIN (Compositor->pipeline), Compositor->sink);

And after removing these we will close the window and re open another for each view(that is new window for every switching closing the previous window)

But at that time we are facing random segmentation fault. When we tried to debug the same we found that the segmentation fault is caused by the gst_bus_set_sync_handler.

 

But if we are not trying to remove the src and sink the application will crash by hitting the fd limit. Can you suggest us a proper way to remove the src and sink from the pipeline.

 

Or can you suggest us the points to be noticed to properly handle the fd issue we are facing.

标记 (3)
0 项奖励
回复
1 回复

653 次查看
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @dilna 

I hope you are doing well.

One can try the concept of Dynamically changing the pipeline.

Please refer the Link.

Thanks & Regards

Sanket Parekh

0 项奖励
回复