add verbatim catchall if no subframes are generated

This commit is contained in:
Josh Coalson 2002-10-11 06:25:16 +00:00
parent f12edc643b
commit 72695809f0

View File

@ -2108,7 +2108,11 @@ FLAC__bool process_subframe_(
}
}
FLAC__ASSERT(_best_bits < UINT_MAX);
/* under rare circumstances this can happen when all but lpc subframe types are disabled: */
if(_best_bits == UINT_MAX) {
FLAC__ASSERT(_best_subframe == 0);
_best_bits = evaluate_verbatim_subframe_(integer_signal, frame_header->blocksize, subframe_bps, subframe[_best_subframe]);
}
*best_subframe = _best_subframe;
*best_bits = _best_bits;