From 31268f2df54a433f2b50440bb504546bd19ed16a Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 21 Mar 2015 19:47:18 +0200 Subject: [PATCH 1/1] decoder: remove unnecessary special case All audio decoders support the *pp_block == NULL case, and return NULL. This enables audio decoders to drain cleanly. --- src/input/decoder.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index ce072a3389..fdf8b18c44 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -1136,9 +1136,6 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block ) int i_lost = 0; int i_played = 0; - if( p_block == NULL ) - return; /* TODO: remove this check, drain audio decoders properly */ - while( (p_aout_buf = p_dec->pf_decode_audio( p_dec, &p_block )) ) { if( DecoderIsFlushing( p_dec ) ) -- 2.39.2