mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-06 12:08:10 +00:00
d3d11compositor: Don't try to read empty buffer
The queued buffer may not be readable buffer in case that upstream sends GAP event or so. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1497>
This commit is contained in:
parent
7bdb37c01b
commit
e63a3a7f31
1 changed files with 6 additions and 0 deletions
|
@ -2429,6 +2429,12 @@ gst_d3d11_compositor_check_device_update (GstElement * agg,
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* Ignore gap buffer */
|
||||||
|
if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP) ||
|
||||||
|
gst_buffer_get_size (buf) == 0) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
mem = gst_buffer_peek_memory (buf, 0);
|
mem = gst_buffer_peek_memory (buf, 0);
|
||||||
/* FIXME: we should be able to accept non-d3d11 memory later once
|
/* FIXME: we should be able to accept non-d3d11 memory later once
|
||||||
* we remove intermediate elements (d3d11upload and d3d11colorconvert)
|
* we remove intermediate elements (d3d11upload and d3d11colorconvert)
|
||||||
|
|
Loading…
Reference in a new issue