decoder: automatically flush the output buffer after decoder exits
A decoder_flush() invocation was missing in the FLAC plugin, resulting in casual assertion failures due to a wrong assumption about the last chunk's audio format. It's much easier to remove that decoder_flush() function and make the decoder thread call ob_flush().
This commit is contained in:
		@@ -21,6 +21,7 @@
 | 
			
		||||
#include "decoder_control.h"
 | 
			
		||||
#include "decoder_internal.h"
 | 
			
		||||
#include "player_control.h"
 | 
			
		||||
#include "outputBuffer.h"
 | 
			
		||||
#include "song.h"
 | 
			
		||||
#include "mapper.h"
 | 
			
		||||
#include "path.h"
 | 
			
		||||
@@ -147,6 +148,8 @@ static void decodeStart(void)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ob_flush();
 | 
			
		||||
 | 
			
		||||
	if (ret < 0 || ret == DECODE_ERROR_UNKTYPE) {
 | 
			
		||||
		if (ret != DECODE_ERROR_UNKTYPE)
 | 
			
		||||
			dc.error = DECODE_ERROR_FILE;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user