mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	v4l2: queue dropped first buffer again
When we drop the first buffer to avoid timestamp problems, queue it again in the driver or else we will not be able to dequeue is again later and we will be running with a buffer less.
This commit is contained in:
		
							parent
							
								
									b807348041
								
							
						
					
					
						commit
						f9eed5843c
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1403,8 +1403,10 @@ static int mmap_read(struct impl *this)
 | 
			
		|||
 | 
			
		||||
	/* Drop the first frame in order to work around common firmware
 | 
			
		||||
	 * timestamp issues */
 | 
			
		||||
	if (buf.sequence == 0)
 | 
			
		||||
	if (buf.sequence == 0) {
 | 
			
		||||
		xioctl(dev->fd, VIDIOC_QBUF, &buf);
 | 
			
		||||
		return 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pts = SPA_TIMEVAL_TO_NSEC(&buf.timestamp);
 | 
			
		||||
	spa_log_trace(this->log, "v4l2 %p: have output %d", this, buf.index);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue