mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-11 06:58:18 +00:00
lpcm: fix sample size calculation for 20bit LCPM.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit f1320dc3be
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
parent
c3bf08d04c
commit
e1b4614ab4
@ -156,7 +156,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data,
|
||||
|
||||
/* There's always an even number of channels in the source */
|
||||
num_source_channels = FFALIGN(avctx->channels, 2);
|
||||
sample_size = (num_source_channels * avctx->bits_per_coded_sample) >> 3;
|
||||
sample_size = (num_source_channels * (avctx->sample_fmt == AV_SAMPLE_FMT_S16 ? 16 : 24)) >> 3;
|
||||
samples = buf_size / sample_size;
|
||||
|
||||
/* get output buffer */
|
||||
|
Loading…
Reference in New Issue
Block a user