mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/flacenc: fix calculation of bits required in case of custom sample rate
Sample rate of 11025 takes 16 bits but previous code would pick only 8.
Fixes assertion failure.
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 3e7d684912
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
106e0fff2e
commit
ac8a265be8
|
@ -916,7 +916,7 @@ static int count_frame_header(FlacEncodeContext *s)
|
||||||
count += 16;
|
count += 16;
|
||||||
|
|
||||||
/* explicit sample rate */
|
/* explicit sample rate */
|
||||||
count += ((s->sr_code[0] == 12) + (s->sr_code[0] > 12)) * 8;
|
count += ((s->sr_code[0] == 12) + (s->sr_code[0] > 12) * 2) * 8;
|
||||||
|
|
||||||
/* frame header CRC-8 */
|
/* frame header CRC-8 */
|
||||||
count += 8;
|
count += 8;
|
||||||
|
|
Loading…
Reference in New Issue