[Spice-devel] [PATCH spice-gtk 30/34] gstaudio: set state to NULL before unref

Marc-André Lureau marcandre.lureau at gmail.com
Mon Jan 7 12:43:58 UTC 2019


On Mon, Jan 7, 2019 at 1:06 PM Snir Sheriber <ssheribe at redhat.com> wrote:
>
> Hi,
>
> On 1/7/19 10:00 AM, marcandre.lureau at redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau at redhat.com>
> >
> > (lt-spicy:13097): GStreamer-CRITICAL **: 18:01:13.698:
> > Trying to dispose element pipeline1, but it is in READY instead of the NULL state.
> > You need to explicitly set elements to the NULL state before
> > dropping the final reference, to allow them to clean up.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
> > ---
> >   src/spice-gstaudio.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/spice-gstaudio.c b/src/spice-gstaudio.c
> > index aff69d2..d0cfbc6 100644
> > --- a/src/spice-gstaudio.c
> > +++ b/src/spice-gstaudio.c
> > @@ -191,7 +191,7 @@ static void record_start(SpiceRecordChannel *channel, gint format, gint channels
> >       if (p->record.pipe &&
> >           (p->record.rate != frequency ||
> >            p->record.channels != channels)) {
> > -        record_stop(gstaudio);
> > +        gst_element_set_state(p->record.pipe, GST_STATE_NULL);
>
>
> I'm not sure, but wouldn't be better to do it in record_stop? or stop
> means pause here?
>

Yes, record_stop is pause. We keep the pipeline around, to avoid
having to recreate it on spice play/stop messages.

>
> Snir.
>
>
> >           g_clear_pointer(&p->record.pipe, gst_object_unref);
> >       }
> >
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau


More information about the Spice-devel mailing list