Skip to content

Commit

Permalink
decoder/flac: ignore FLAC__STREAM_DECODER_END_OF_LINK (FLAC 1.5)
Browse files Browse the repository at this point in the history
Fixes -Wswitch compiler warning when building with FLAC 1.5.

Closes #2219
  • Loading branch information
MaxKellermann committed Feb 28, 2025
1 parent 36482f5 commit 4cefb30
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/decoder/plugins/FlacDecoderPlugin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ flacPrintErroredState(FLAC__StreamDecoderState state) noexcept
case FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC:
case FLAC__STREAM_DECODER_READ_FRAME:
case FLAC__STREAM_DECODER_END_OF_STREAM:
#if FLAC_API_VERSION_CURRENT >= 14
case FLAC__STREAM_DECODER_END_OF_LINK:
#endif
return;

case FLAC__STREAM_DECODER_OGG_ERROR:
Expand Down Expand Up @@ -216,6 +219,12 @@ flac_decoder_loop(FlacDecoder *data, FLAC__StreamDecoder *flac_dec)
case FLAC__STREAM_DECODER_UNINITIALIZED:
/* we shouldn't see this, ever - bail out */
return;

#if FLAC_API_VERSION_CURRENT >= 14
case FLAC__STREAM_DECODER_END_OF_LINK:
/* TODO support FLAC 1.5 chained streams */
return;
#endif
}

if (!FLAC__stream_decoder_process_single(flac_dec) &&
Expand Down

0 comments on commit 4cefb30

Please sign in to comment.