Why is the reference count of sink element 0 when it is disconnected from a pipeline

cfd new newcfd at yahoo.com
Thu Oct 5 23:03:23 UTC 2023


I have a audio pipeline with a sink. When I switch audio devices, I want to replace the sink only. What I did in the code are,1. set pipeline state to NULL
1. disconnect sink element from the pipeline2. unref it <===problem here: reference count is 0 and can not unref it. Why?
3. create a new sink element and link it to pipeline4. set pipeline state to PLAYING
   the pipeline works fine with the new sink. But why can not the old sink be deleted? 
   thanks for your help,
   Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20231005/170d9a50/attachment.htm>


More information about the gstreamer-devel mailing list