mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05: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
 | 
					  if (gst_buffer_n_memory (buffer) == 1
 | 
				
			||||||
      && gst_is_fd_memory (gst_buffer_peek_memory (buffer, 0))) {
 | 
					      && gst_is_fd_memory (gst_buffer_peek_memory (buffer, 0))) {
 | 
				
			||||||
    mem = gst_buffer_get_memory (buffer, 0);
 | 
					    mem = gst_buffer_get_memory (buffer, 0);
 | 
				
			||||||
    *tmpfile = FALSE;
 | 
					    *tmpfile = gst_is_tmpfile_memory (mem);
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    GstMapInfo info;
 | 
					    GstMapInfo info;
 | 
				
			||||||
    GstAllocationParams params = {0, 0, 0, 0, { NULL, }};
 | 
					    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
 | 
					  if (gst_buffer_n_memory (buffer) == 1
 | 
				
			||||||
      && gst_is_fd_memory (gst_buffer_peek_memory (buffer, 0))) {
 | 
					      && gst_is_fd_memory (gst_buffer_peek_memory (buffer, 0))) {
 | 
				
			||||||
    mem = gst_buffer_get_memory (buffer, 0);
 | 
					    mem = gst_buffer_get_memory (buffer, 0);
 | 
				
			||||||
    tmpfile = FALSE;
 | 
					    tmpfile = gst_is_tmpfile_memory (mem);
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    GstMapInfo minfo;
 | 
					    GstMapInfo minfo;
 | 
				
			||||||
    GstAllocationParams params = {0, 0, 0, 0, { NULL, }};
 | 
					    GstAllocationParams params = {0, 0, 0, 0, { NULL, }};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue