mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
waylandsink: Properly handle unrecoverable errors
Allocation failures cannot be recovered and should lead to an error being posted on the bus. Otherwise the pipeline will just stall. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7903>
This commit is contained in:
parent
f9c01f6479
commit
0e2efb2de4
2 changed files with 18 additions and 10 deletions
|
@ -1289,25 +1289,29 @@ no_window_size:
|
||||||
}
|
}
|
||||||
no_buffer:
|
no_buffer:
|
||||||
{
|
{
|
||||||
GST_WARNING_OBJECT (self, "could not create buffer");
|
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
|
||||||
|
("could not create buffer"), (NULL));
|
||||||
|
ret = GST_FLOW_ERROR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
no_wl_buffer_shm:
|
no_wl_buffer_shm:
|
||||||
{
|
{
|
||||||
GST_ERROR_OBJECT (self, "could not create wl_buffer out of wl_shm memory");
|
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
|
||||||
|
("could not create wl_buffer out of wl_shm memory"), (NULL));
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
no_wl_buffer:
|
no_wl_buffer:
|
||||||
{
|
{
|
||||||
GST_ERROR_OBJECT (self,
|
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
|
||||||
"buffer %" GST_PTR_FORMAT " cannot have a wl_buffer", buffer);
|
("buffer %" GST_PTR_FORMAT " cannot have a wl_buffer", buffer), (NULL));
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
activate_failed:
|
activate_failed:
|
||||||
{
|
{
|
||||||
GST_ERROR_OBJECT (self, "failed to activate bufferpool.");
|
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
|
||||||
|
("failed to activate bufferpool."), (NULL));
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1070,25 +1070,29 @@ no_window_size:
|
||||||
}
|
}
|
||||||
no_buffer:
|
no_buffer:
|
||||||
{
|
{
|
||||||
GST_WARNING_OBJECT (self, "could not create buffer");
|
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
|
||||||
|
("could not create buffer"), (NULL));
|
||||||
|
ret = GST_FLOW_ERROR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
no_wl_buffer_shm:
|
no_wl_buffer_shm:
|
||||||
{
|
{
|
||||||
GST_ERROR_OBJECT (self, "could not create wl_buffer out of wl_shm memory");
|
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
|
||||||
|
("could not create wl_buffer out of wl_shm memory"), (NULL));
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
no_wl_buffer:
|
no_wl_buffer:
|
||||||
{
|
{
|
||||||
GST_ERROR_OBJECT (self,
|
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
|
||||||
"buffer %" GST_PTR_FORMAT " cannot have a wl_buffer", buffer);
|
("buffer %" GST_PTR_FORMAT " cannot have a wl_buffer", buffer), (NULL));
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
activate_failed:
|
activate_failed:
|
||||||
{
|
{
|
||||||
GST_ERROR_OBJECT (self, "failed to activate bufferpool.");
|
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
|
||||||
|
("failed to activate bufferpool."), (NULL));
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue