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

Git pushed a commit to branch master
in repository ffmpeg.

commit 7ab12fd02a87cd71afc1052d050f88705283ef8b
Author:     James Almer <[email protected]>
AuthorDate: Fri Jun 26 22:07:46 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Mon Jun 29 14:00:25 2026 -0300

    avformat/movenc: use frame_size for EAC3 when merging packets
    
    Otherwise remainder calculations will not work correctly if the input 
packets
    have smaller frame sizes.
    
    Should fix issue #23600.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavformat/movenc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index f1e3e3faef..536b16a152 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -598,6 +598,7 @@ concatenate:
         goto end;
     } else {
         const AVPacketSideData *sd;
+        int64_t duration = pkt->duration;
         if ((ret = av_grow_packet(info->pkt, pkt->size)) < 0)
             goto end;
         sd = av_packet_side_data_get(pkt->side_data, pkt->side_data_elems, 
AV_PKT_DATA_SKIP_SAMPLES);
@@ -605,10 +606,13 @@ concatenate:
             uint8_t *buf = av_packet_new_side_data(info->pkt, 
AV_PKT_DATA_SKIP_SAMPLES, sd->size);
             if (buf)
                 memcpy(buf, sd->data, sd->size);
+            if (track->par->frame_size)
+                duration = FFMAX(av_rescale_q(track->par->frame_size, 
(AVRational){ 1, track->par->sample_rate },
+                                              track->st->time_base), duration);
         }
         memcpy(info->pkt->data + info->pkt->size - pkt->size, pkt->data, 
pkt->size);
         info->num_blocks += num_blocks;
-        info->pkt->duration += pkt->duration;
+        info->pkt->duration += duration;
         if (info->num_blocks != 6)
             goto end;
         av_packet_unref(pkt);
@@ -1399,6 +1403,7 @@ static int mov_write_audio_tag(AVFormatContext *s, 
AVIOContext *pb, MOVMuxContex
 
     if (track->mode == MODE_MOV) {
         if (track->par->sample_rate > UINT16_MAX || 
!track->par->ch_layout.nb_channels ||
+            track->par->codec_id == AV_CODEC_ID_EAC3 ||
             track->par->ch_layout.nb_channels > 2) {
             if (mov_get_lpcm_flags(track->par->codec_id))
                 tag = AV_RL32("lpcm");

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

Reply via email to