update libavcodec/pcm-dvdenc.c.

fix ffmpeg problem

Signed-off-by: ziyugao <gaoziyu0614@outlook.com>
This commit is contained in:
ziyugao 2024-07-08 02:19:11 +00:00 committed by Gitee
parent 2cf28cb54e
commit ace2945bdc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -117,7 +117,7 @@ static int pcm_dvd_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
{
PCMDVDContext *s = avctx->priv_data;
int samples = frame->nb_samples * avctx->ch_layout.nb_channels;
int64_t pkt_size = (frame->nb_samples / s->samples_per_block) * s->block_size + 3;
int64_t pkt_size = (int64_t)(frame->nb_samples / s->samples_per_block) * s->block_size + 3;
int blocks = (pkt_size - 3) / s->block_size;
const int16_t *src16;
const int32_t *src32;