Commit f0476f08 authored by Tristan Matthews's avatar Tristan Matthews Committed by Felix Paul Kühne

flac: reset decoder on end of stream (fixes #9298)

(cherry picked from commit 033cdd9009df398c3fedffd8b5c31655f60256e4)
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent f0e0286b
...@@ -526,10 +526,16 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -526,10 +526,16 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
/* If the decoder is in the "aborted" state, /* If the decoder is in the "aborted" state,
* FLAC__stream_decoder_process_single() won't return an error. */ * FLAC__stream_decoder_process_single() won't return an error. */
if( FLAC__stream_decoder_get_state(p_dec->p_sys->p_flac) switch ( FLAC__stream_decoder_get_state(p_dec->p_sys->p_flac) )
== FLAC__STREAM_DECODER_ABORTED )
{ {
case FLAC__STREAM_DECODER_ABORTED:
FLAC__stream_decoder_flush( p_dec->p_sys->p_flac ); FLAC__stream_decoder_flush( p_dec->p_sys->p_flac );
break;
case FLAC__STREAM_DECODER_END_OF_STREAM:
FLAC__stream_decoder_reset( p_dec->p_sys->p_flac );
break;
default:
break;
} }
block_Release( p_sys->p_block ); block_Release( p_sys->p_block );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment