[FFmpeg-cvslog] avcodec/roqaudioenc: unbreak mono encoding
Paul B Mahol
git at videolan.org
Sun Feb 12 00:00:27 EET 2023
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Feb 11 22:56:10 2023 +0100| [2b4273072dbb1dde2ab4bbbd30b3cef4042fc4fb] | committer: Paul B Mahol
avcodec/roqaudioenc: unbreak mono encoding
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b4273072dbb1dde2ab4bbbd30b3cef4042fc4fb
---
libavcodec/roqaudioenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
More information about the ffmpeg-cvslog
mailing list