mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: libcamera: source: set chunk flags on error
Set `SPA_CHUNK_FLAG_CORRUPTED` if the frame buffer metadata
signals anything other than success.
(cherry picked from commit 25075bb3d7)
			
			
This commit is contained in:
		
							parent
							
								
									8ed8f21100
								
							
						
					
					
						commit
						11d224befa
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1075,6 +1075,15 @@ void handle_completed_request(struct impl *impl, libcamera::Request *request)
 | 
			
		|||
		b->h->dts_offset = 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for (std::size_t i = 0; i < b->outbuf->n_datas; i++) {
 | 
			
		||||
		auto *d = &b->outbuf->datas[i];
 | 
			
		||||
 | 
			
		||||
		d->chunk->flags = 0;
 | 
			
		||||
 | 
			
		||||
		if (fmd.status != libcamera::FrameMetadata::Status::FrameSuccess)
 | 
			
		||||
			d->chunk->flags |= SPA_CHUNK_FLAG_CORRUPTED;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	request->reuse(libcamera::Request::ReuseFlag::ReuseBuffers);
 | 
			
		||||
 | 
			
		||||
	spa_list_append(&port->queue, &b->link);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue