This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit f71410e0288f0c40ae2fb5e5a4d7428763d08a71 Author: Michael Niedermayer <[email protected]> AuthorDate: Thu Nov 5 03:41:23 2026 +0100 Commit: michaelni <[email protected]> CommitDate: Thu Nov 5 23:01:56 2026 +0000 avcodec/roqaudioenc: encode the buffered samples when flushed early Encode the buffered samples once and return no packet when the buffer is empty. Fixes: use of uninitialized memory Fixes: X43TLCpjYK88 Fixes: AISLE-2026-0150-00397 Use of uninitialized memory Replicated through UnModified FFmpeg with Valgrind Found-by: Joshua Rogers (AISLE) The fix was suggested in the report. --- libavcodec/roqaudioenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c index 8a626c0d29..c0e9967ab4 100644 --- a/libavcodec/roqaudioenc.c +++ b/libavcodec/roqaudioenc.c @@ -131,7 +131,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, stereo = (channels == 2); - if (!in && context->input_frames >= 8) + if (!in && (context->input_frames >= 8 || !context->buffered_samples)) return 0; if (in && context->input_frames < 8) { @@ -153,7 +153,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, context->lastSample[1] &= 0xFF00; } - if (context->input_frames == 7) + if (context->input_frames < 8) data_size = channels * context->buffered_samples; else data_size = channels * avctx->frame_size; @@ -181,7 +181,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, avpkt->duration = data_size / channels; context->input_frames++; - if (!in) + if (!frame) context->input_frames = FFMAX(context->input_frames, 8); *got_packet_ptr = 1; -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
