Skip to content

Commit 1a6754b

Browse files
committed
libFLAC.cs:
Add the following enum members to FLAC__StreamDecoderErrorStatus: FLAC__STREAM_DECODER_ERROR_STATUS_BAD_METADATA FLAC__STREAM_DECODER_ERROR_STATUS_OUT_OF_BOUNDS FLAC__STREAM_DECODER_ERROR_STATUS_MISSING_FRAME Details: https://xiph.org/flac/api/group__porting__1__4__3__to__1__5__0.html
1 parent b3afc46 commit 1a6754b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CUETools.Codecs.libFLAC/Reader.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,14 @@ void ErrorCallback(IntPtr decoder,
240240
throw new Exception("encountered a corrupted frame header");
241241
case FLAC__StreamDecoderErrorStatus.FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH:
242242
throw new Exception("frame CRC mismatch");
243+
case FLAC__StreamDecoderErrorStatus.FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM:
244+
throw new Exception("unparseable stream");
245+
case FLAC__StreamDecoderErrorStatus.FLAC__STREAM_DECODER_ERROR_STATUS_BAD_METADATA:
246+
throw new Exception("corrupted metadata block");
247+
case FLAC__StreamDecoderErrorStatus.FLAC__STREAM_DECODER_ERROR_STATUS_OUT_OF_BOUNDS:
248+
throw new Exception("out of bounds");
249+
case FLAC__StreamDecoderErrorStatus.FLAC__STREAM_DECODER_ERROR_STATUS_MISSING_FRAME:
250+
throw new Exception("missing frame");
243251
default:
244252
throw new Exception("an unknown error has occurred");
245253
}

CUETools.Codecs.libFLAC/libFLAC.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ internal enum FLAC__StreamDecoderErrorStatus
138138
FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC,
139139
FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER,
140140
FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH,
141-
FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM
141+
FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM,
142+
FLAC__STREAM_DECODER_ERROR_STATUS_BAD_METADATA,
143+
FLAC__STREAM_DECODER_ERROR_STATUS_OUT_OF_BOUNDS,
144+
FLAC__STREAM_DECODER_ERROR_STATUS_MISSING_FRAME
142145
};
143146

144147
internal enum FLAC__StreamDecoderState

0 commit comments

Comments
 (0)