mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	stream: copy the position before doing the callback
So that the callback can look at the updated queued bytes
This commit is contained in:
		
							parent
							
								
									fc0354ae1d
								
							
						
					
					
						commit
						f777da9feb
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -807,6 +807,8 @@ again:
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						copy_position(impl, impl->queued.outcount);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!impl->draining &&
 | 
						if (!impl->draining &&
 | 
				
			||||||
	    !SPA_FLAG_IS_SET(impl->flags, PW_STREAM_FLAG_DRIVER) &&
 | 
						    !SPA_FLAG_IS_SET(impl->flags, PW_STREAM_FLAG_DRIVER) &&
 | 
				
			||||||
	    spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index) > 0) {
 | 
						    spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index) > 0) {
 | 
				
			||||||
| 
						 | 
					@ -815,7 +817,6 @@ again:
 | 
				
			||||||
		    io->status == SPA_STATUS_NEED_DATA)
 | 
							    io->status == SPA_STATUS_NEED_DATA)
 | 
				
			||||||
			goto again;
 | 
								goto again;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	copy_position(impl, impl->queued.outcount);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_log_trace(NAME" %p: res %d", stream, res);
 | 
						pw_log_trace(NAME" %p: res %d", stream, res);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue