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

Git pushed a commit to branch master
in repository ffmpeg.

commit 041d10895884b64ba412485d5b3faa0a13a2a4e3
Author:     James Almer <[email protected]>
AuthorDate: Tue Jan 27 10:42:59 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Thu Jan 29 21:09:02 2026 -0300

    avcodec/opus/enc: don't remove more samples than needed from the last packet
    
    The hardcoded extra 120 samples results in the side data reporting the need 
to
    discard the entire packet rather than the padding samples.
    This is in line with the behavior of the libopus encoder.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavcodec/opus/enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/opus/enc.c b/libavcodec/opus/enc.c
index 1bbeb4bf6e..65e6a09575 100644
--- a/libavcodec/opus/enc.c
+++ b/libavcodec/opus/enc.c
@@ -604,7 +604,7 @@ static int opus_encode_frame(AVCodecContext *avctx, 
AVPacket *avpkt,
         uint8_t *side = av_packet_new_side_data(avpkt, 
AV_PKT_DATA_SKIP_SAMPLES, 10);
         if (!side)
             return AVERROR(ENOMEM);
-        AV_WL32(&side[4], s->packet.frames*frame_size - avpkt->duration + 120);
+        AV_WL32(&side[4], s->packet.frames*frame_size - avpkt->duration);
     }
 
     *got_packet_ptr = 1;

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

Reply via email to