1
0
Fork 0

avcodec/roqaudioenc: unbreak mono encoding

This commit is contained in:
Paul B Mahol 2023-02-11 22:56:10 +01:00
parent a13210ab39
commit 2b4273072d
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
/* Write the actual samples */
for (i = 0; i < data_size; i++)
*out++ = dpcm_predict(&context->lastSample[i & 1], *in++);
*out++ = dpcm_predict(&context->lastSample[(i & 1) & stereo], *in++);
avpkt->pts = context->input_frames <= 7 ? context->first_pts : frame->pts;
avpkt->duration = data_size / channels;