mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	audioconvert: fix draining
When we get something else that a drain status as input, bring us back to the non-drained state. When we are draining, don't remove the drained flag on the input io status. This needs to be cleared by the host when the draining is finished. Fixes speaker-test
This commit is contained in:
		
							parent
							
								
									9af9450888
								
							
						
					
					
						commit
						a2521bb3e0
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -2252,6 +2252,7 @@ static int impl_node_process(void *object)
 | 
				
			||||||
				spa_log_trace_fp(this->log, "%p: empty input port %d %p %d %d %d",
 | 
									spa_log_trace_fp(this->log, "%p: empty input port %d %p %d %d %d",
 | 
				
			||||||
						this, port->id, io, io->status, io->buffer_id,
 | 
											this, port->id, io, io->status, io->buffer_id,
 | 
				
			||||||
						port->n_buffers);
 | 
											port->n_buffers);
 | 
				
			||||||
 | 
									this->drained = false;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			buf = NULL;
 | 
								buf = NULL;
 | 
				
			||||||
		} else if (SPA_UNLIKELY(io->buffer_id >= port->n_buffers)) {
 | 
							} else if (SPA_UNLIKELY(io->buffer_id >= port->n_buffers)) {
 | 
				
			||||||
| 
						 | 
					@ -2531,7 +2532,8 @@ static int impl_node_process(void *object)
 | 
				
			||||||
			if (SPA_UNLIKELY((io = port->io) == NULL))
 | 
								if (SPA_UNLIKELY((io = port->io) == NULL))
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			spa_log_trace_fp(this->log, "return: input %d %d", port->id, io->buffer_id);
 | 
								spa_log_trace_fp(this->log, "return: input %d %d", port->id, io->buffer_id);
 | 
				
			||||||
			io->status = SPA_STATUS_NEED_DATA;
 | 
								if (!draining)
 | 
				
			||||||
 | 
									io->status = SPA_STATUS_NEED_DATA;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		this->in_offset = 0;
 | 
							this->in_offset = 0;
 | 
				
			||||||
		max_in = 0;
 | 
							max_in = 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue