This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 0aa3a6fe41baec832da5df88a8bb097e75857999
Author:     James Almer <[email protected]>
AuthorDate: Fri Feb 13 13:02:20 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Tue Feb 17 20:17:23 2026 -0300

    avcodec/libvorbisenc: rescale packet duration when calculating discarded 
samples
    
    Signed-off-by: James Almer <[email protected]>
---
 libavcodec/libvorbisenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c
index a3f02f3cb9..c54ebebae8 100644
--- a/libavcodec/libvorbisenc.c
+++ b/libavcodec/libvorbisenc.c
@@ -421,7 +421,7 @@ static int libvorbis_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
 
         ff_af_queue_remove(&s->afq, duration, &avpkt->pts, &avpkt->duration);
 
-        discard_padding = ff_samples_to_time_base(avctx, duration) - 
avpkt->duration;
+        discard_padding = duration - ff_samples_from_time_base(avctx, 
avpkt->duration);
         if (discard_padding > 0) {
             uint8_t *side_data = av_packet_new_side_data(avpkt,
                                                          
AV_PKT_DATA_SKIP_SAMPLES,

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to