Skip to content

Commit e50c876

Browse files
committed
Do not try to apply replaygain when bps changes
Credit: Oss-Fuzz Issue: N/A
1 parent 33b9a4a commit e50c876

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/flac/decode.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,10 @@ FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder
11541154
flac__utils_printf(stderr, 1, "%s: ERROR, bits-per-sample is %u in this frame but %u in previous frames\n", decoder_session->inbasefilename, bps, decoder_session->bps);
11551155
if(!decoder_session->continue_through_decode_errors)
11561156
return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
1157+
else if(decoder_session->replaygain.apply) {
1158+
flac__utils_printf(stderr, 1, "%s: ERROR, cannot decode through previous error with replaygain application turned on\n", decoder_session->inbasefilename, bps, decoder_session->bps);
1159+
return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
1160+
}
11571161
}
11581162
}
11591163
else {

0 commit comments

Comments
 (0)