avcodec/roqaudioenc: unbreak mono encoding

release/6.0
Paul B Mahol 2 years ago
parent a13210ab39
commit 2b4273072d
  1. 2
      libavcodec/roqaudioenc.c

@ -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;

Loading…
Cancel
Save