This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 4520d15066b247bfa9f02cbfb28a7bc8f540304e Author: Michael Niedermayer <[email protected]> AuthorDate: Sun Nov 8 17:17:19 2026 +0100 Commit: michaelni <[email protected]> CommitDate: Thu Nov 12 13:55:55 2026 +0000 avcodec/encode: pad to the frame size when a fixed frame size is requested Fixes: AV_CODEC_FLAG2_FIXED_FRAME_SIZE ignored by encoders with pad_samples Testcase: ffmpeg -f lavfi -i "sine=r=48000,atrim=end_sample=85" -ac 2 -c:a aptx -flags2 +fixed_frame_size -f framecrc - --- libavcodec/encode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 6785d75e4d..27c4fd186a 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -510,7 +510,8 @@ static int encode_send_frame_internal(AVCodecContext *avctx, const AVFrame *src) ec->last_audio_frame = 1; if (!(avctx->codec->capabilities & AV_CODEC_CAP_SMALL_LAST_FRAME) || (avctx->flags2 & AV_CODEC_FLAG2_FIXED_FRAME_SIZE)) { - int pad_samples = avci->pad_samples ? avci->pad_samples : avctx->frame_size; + int pad_samples = avci->pad_samples && !(avctx->flags2 & AV_CODEC_FLAG2_FIXED_FRAME_SIZE) ? + avci->pad_samples : avctx->frame_size; int out_samples = (src->nb_samples + pad_samples - 1) / pad_samples * pad_samples; if (out_samples != src->nb_samples) { -- 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]
