decoder/flac: try to recover from seek error()
libFLAC API documentation suggests that FLAC__stream_decoder_flush() should be called to recover from FLAC__STREAM_DECODER_SEEK_ERROR.
This commit is contained in:
@ -209,8 +209,16 @@ flac_decoder_loop(struct flac_data *data, FLAC__StreamDecoder *flac_dec,
|
|||||||
/* regular end of stream */
|
/* regular end of stream */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case FLAC__STREAM_DECODER_OGG_ERROR:
|
|
||||||
case FLAC__STREAM_DECODER_SEEK_ERROR:
|
case FLAC__STREAM_DECODER_SEEK_ERROR:
|
||||||
|
/* try to recover from seek error */
|
||||||
|
if (!FLAC__stream_decoder_flush(flac_dec)) {
|
||||||
|
LogError(flac_domain, "FLAC__stream_decoder_flush() failed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case FLAC__STREAM_DECODER_OGG_ERROR:
|
||||||
case FLAC__STREAM_DECODER_ABORTED:
|
case FLAC__STREAM_DECODER_ABORTED:
|
||||||
case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
|
case FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
|
||||||
/* an error, fatal enough for us to abort the
|
/* an error, fatal enough for us to abort the
|
||||||
|
Reference in New Issue
Block a user