aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-02-11 22:56:10 +0100
committerPaul B Mahol <onemda@gmail.com>2023-02-11 22:59:57 +0100
commit2b4273072dbb1dde2ab4bbbd30b3cef4042fc4fb (patch)
tree9ddac3ae0c42e2881d183210acbab8a3ee3e85a7 /libavcodec
parenta13210ab398c83ecd5eba96c3fe0d93827ea80e1 (diff)
downloadffmpeg-2b4273072dbb1dde2ab4bbbd30b3cef4042fc4fb.tar.gz
avcodec/roqaudioenc: unbreak mono encoding
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/roqaudioenc.c2
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;