mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	v4l2: don't select DmaBuf when the type mask is invalid
an invalid data type mask means that the caller did not explicitly allowed DmaBuf so fall back to memptr or memfd. Fixes #1054
This commit is contained in:
		
							parent
							
								
									cd79cdfb40
								
							
						
					
					
						commit
						9c8a578e21
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -1457,7 +1457,9 @@ mmap_init(struct impl *this,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		spa_log_debug(this->log, "v4l2: data types %08x", d[0].type);
 | 
							spa_log_debug(this->log, "v4l2: data types %08x", d[0].type);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (port->have_expbuf && (d[0].type & (1u << SPA_DATA_DmaBuf))) {
 | 
							if (port->have_expbuf &&
 | 
				
			||||||
 | 
							    d[0].type != SPA_ID_INVALID &&
 | 
				
			||||||
 | 
							    (d[0].type & (1u << SPA_DATA_DmaBuf))) {
 | 
				
			||||||
			struct v4l2_exportbuffer expbuf;
 | 
								struct v4l2_exportbuffer expbuf;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			spa_zero(expbuf);
 | 
								spa_zero(expbuf);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue