From ae098db0bb749cd4b62aa2a40faad31af3c777e6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 10 Dec 2015 10:00:30 +0100 Subject: [PATCH] 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. --- src/gst/gstpinospay.c | 2 +- src/gst/gstpinossink.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gst/gstpinospay.c b/src/gst/gstpinospay.c index 9bf721e32..619333dfb 100644 --- a/src/gst/gstpinospay.c +++ b/src/gst/gstpinospay.c @@ -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, }}; diff --git a/src/gst/gstpinossink.c b/src/gst/gstpinossink.c index 7a5f61f5a..8adf3051b 100644 --- a/src/gst/gstpinossink.c +++ b/src/gst/gstpinossink.c @@ -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, }};