mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-11-05 16:26:16 +00:00
gstpinos: detect tmpfile memory
Check if we got tmpfile memory and if we do, don't bother waiting for the release-fd message but unref the memory directly. We know the memory is allocated from our allocator and that we won't reuse it.
This commit is contained in:
parent
df171356fe
commit
ae098db0bb
2 changed files with 2 additions and 2 deletions
|
@ -284,7 +284,7 @@ gst_pinos_pay_get_fd_memory (GstPinosPay * tmpfilepay, GstBuffer * buffer, gbool
|
|||
if (gst_buffer_n_memory (buffer) == 1
|
||||
&& gst_is_fd_memory (gst_buffer_peek_memory (buffer, 0))) {
|
||||
mem = gst_buffer_get_memory (buffer, 0);
|
||||
*tmpfile = FALSE;
|
||||
*tmpfile = gst_is_tmpfile_memory (mem);
|
||||
} else {
|
||||
GstMapInfo info;
|
||||
GstAllocationParams params = {0, 0, 0, 0, { NULL, }};
|
||||
|
|
|
@ -448,7 +448,7 @@ gst_pinos_sink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
|||
if (gst_buffer_n_memory (buffer) == 1
|
||||
&& gst_is_fd_memory (gst_buffer_peek_memory (buffer, 0))) {
|
||||
mem = gst_buffer_get_memory (buffer, 0);
|
||||
tmpfile = FALSE;
|
||||
tmpfile = gst_is_tmpfile_memory (mem);
|
||||
} else {
|
||||
GstMapInfo minfo;
|
||||
GstAllocationParams params = {0, 0, 0, 0, { NULL, }};
|
||||
|
|
Loading…
Reference in a new issue