gst: do a sync before disconnect

This makes sure we first nicely remove the stream from the server
and then close the socket.

If we don't do this, the disconnect might not have flushed out our
disconnect and the server is left with a non-responsive node,
especially if the disconnect on the core was done with a socket from
the portal that is still open.
This commit is contained in:
Wim Taymans 2020-05-21 12:22:48 +02:00
parent 48dea3d5ea
commit 6eba010d38
4 changed files with 81 additions and 12 deletions

View file

@ -87,6 +87,10 @@ struct _GstPipeWireSink {
struct pw_context *context;
struct pw_core *core;
struct spa_hook core_listener;
int pending_seq;
int last_seq;
int last_error;
struct pw_stream *stream;
struct spa_hook stream_listener;