mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
shmsink: do not keep locking if element is unlocked
https://bugzilla.gnome.org/show_bug.cgi?id=797260
This commit is contained in:
parent
84bcd14848
commit
5078116889
1 changed files with 6 additions and 0 deletions
|
@ -352,6 +352,7 @@ gst_shm_sink_init (GstShmSink * self)
|
|||
{
|
||||
g_cond_init (&self->cond);
|
||||
self->size = DEFAULT_SIZE;
|
||||
self->unlock = FALSE;
|
||||
self->wait_for_connection = DEFAULT_WAIT_FOR_CONNECTION;
|
||||
self->perms = DEFAULT_PERMS;
|
||||
|
||||
|
@ -670,6 +671,11 @@ gst_shm_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
|||
gsize written_bytes;
|
||||
|
||||
GST_OBJECT_LOCK (self);
|
||||
if (self->unlock) {
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
|
||||
while (self->wait_for_connection && !self->clients) {
|
||||
g_cond_wait (&self->cond, GST_OBJECT_GET_LOCK (self));
|
||||
if (self->unlock) {
|
||||
|
|
Loading…
Reference in a new issue