diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-02-11 22:56:10 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-02-11 22:59:57 +0100 |
commit | 2b4273072dbb1dde2ab4bbbd30b3cef4042fc4fb (patch) | |
tree | 9ddac3ae0c42e2881d183210acbab8a3ee3e85a7 /libavcodec/roqaudioenc.c | |
parent | a13210ab398c83ecd5eba96c3fe0d93827ea80e1 (diff) | |
download | ffmpeg-2b4273072dbb1dde2ab4bbbd30b3cef4042fc4fb.tar.gz |
avcodec/roqaudioenc: unbreak mono encoding
Diffstat (limited to 'libavcodec/roqaudioenc.c')
-rw-r--r-- | libavcodec/roqaudioenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c index f0254adc70..81dccd09b5 100644 --- a/libavcodec/roqaudioenc.c +++ b/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; |