Re: Why is the reference count of sink element 0 when it is disconnected from a pipeline
Fabio Estevam via gstreamer-devel <[email protected]> Fri, 6 Oct 2023 07:45:42 -0300
| Newsgroups | gmane.comp.video.gstreamer.devel |
|---|---|
| Message-ID | <CAOMZO5BOg12+fzbuxN+f-=gjgPSB7qAx7YryQJ19rFuspRuL1Q@mail.gmail.com> |
On Thu, Oct 5, 2023, 20:03 cfd new via gstreamer-devel < [email protected]> wrote: > 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 pipeline > 2. unref it <===problem here: reference count is 0 and can not unref it. > Why? > 3. create a new sink element and link it to pipeline > 4. 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 >