mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-15 19:27:28 +00:00
avcodec/roqaudioenc: unbreak mono encoding
This commit is contained in:
parent
a13210ab39
commit
2b4273072d
@ -174,7 +174,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
|
|
||||||
/* Write the actual samples */
|
/* Write the actual samples */
|
||||||
for (i = 0; i < data_size; i++)
|
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->pts = context->input_frames <= 7 ? context->first_pts : frame->pts;
|
||||||
avpkt->duration = data_size / channels;
|
avpkt->duration = data_size / channels;
|
||||||
|
Loading…
Reference in New Issue
Block a user