mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	v4l2: always emit have_output, recycle what was not collected
This commit is contained in:
		
							parent
							
								
									827f0763ef
								
							
						
					
					
						commit
						0f4142f879
					
				
					 1 changed files with 6 additions and 7 deletions
				
			
		| 
						 | 
					@ -930,14 +930,13 @@ static int mmap_read(struct impl *this)
 | 
				
			||||||
	d[0].chunk->size = buf.bytesused;
 | 
						d[0].chunk->size = buf.bytesused;
 | 
				
			||||||
	d[0].chunk->stride = state->fmt.fmt.pix.bytesperline;
 | 
						d[0].chunk->stride = state->fmt.fmt.pix.bytesperline;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (io->buffer_id != SPA_ID_INVALID)
 | 
				
			||||||
 | 
							spa_v4l2_buffer_recycle(this, io->buffer_id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	b->outstanding = true;
 | 
						b->outstanding = true;
 | 
				
			||||||
	if (io->status != SPA_RESULT_HAVE_BUFFER) {
 | 
						io->buffer_id = b->outbuf->id;
 | 
				
			||||||
		io->buffer_id = b->outbuf->id;
 | 
						io->status = SPA_RESULT_HAVE_BUFFER;
 | 
				
			||||||
		io->status = SPA_RESULT_HAVE_BUFFER;
 | 
						this->callbacks->have_output(this->callbacks_data);
 | 
				
			||||||
		this->callbacks->have_output(this->callbacks_data);
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		spa_v4l2_buffer_recycle(this, b->outbuf->id);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return SPA_RESULT_OK;
 | 
						return SPA_RESULT_OK;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue