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:
Wim Taymans 2015-12-10 10:00:30 +01:00
parent df171356fe
commit ae098db0bb
2 changed files with 2 additions and 2 deletions

View file

@ -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, }};

View file

@ -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, }};