mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mlpenc: fix regression in encoding only zeroes
Previously it would use more bits than neccessary.
This commit is contained in:
parent
9c1294eadd
commit
394106a138
|
@ -452,7 +452,7 @@ static void default_decoding_params(MLPEncodeContext *ctx, DecodingParams *decod
|
|||
*/
|
||||
static int inline number_sbits(int32_t n)
|
||||
{
|
||||
return 33 - ff_clz(FFABS(n)|1);
|
||||
return 33 - ff_clz(FFABS(n)|1) - !n;
|
||||
}
|
||||
|
||||
enum InputBitDepth {
|
||||
|
|
Loading…
Reference in New Issue