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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 3acec0a1af avformat/iamf_writer: don't discard skip samples signaled 
through side data for Opus
3acec0a1af is described below

commit 3acec0a1af2dda0a0838689b8b8649e7deb080a0
Author:     James Almer <[email protected]>
AuthorDate: Wed Aug 26 20:13:51 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Fri Aug 28 00:17:50 2026 -0300

    avformat/iamf_writer: don't discard skip samples signaled through side data 
for Opus
    
    If it's set, then it should be used.
    Fixes issue #24285.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavformat/iamf_writer.c                       | 7 ++++---
 tests/ref/fate/iamf-5_1-copy                    | 4 ++--
 tests/ref/fate/iamf-ambisonic_1-projection-copy | 4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/libavformat/iamf_writer.c b/libavformat/iamf_writer.c
index 3014f0daa1..15f83b85b0 100644
--- a/libavformat/iamf_writer.c
+++ b/libavformat/iamf_writer.c
@@ -1274,9 +1274,10 @@ int ff_iamf_write_audio_frame(const IAMFContext *iamf, 
AVIOContext *pb,
 
     if (codec_config->codec_id == AV_CODEC_ID_OPUS) {
         // IAMF's num_samples_to_trim_at_start is the same as Opus's pre-skip.
-        skip_samples = pkt->dts < 0
-            ? av_rescale(-pkt->dts, 48000, pkt->time_base.den)
-            : 0;
+        if (!skip_samples)
+            skip_samples = pkt->dts < 0
+                ? av_rescale(-pkt->dts, 48000, pkt->time_base.den)
+                : 0;
         discard_padding = av_rescale(discard_padding, 48000, 
pkt->time_base.den);
     }
 
diff --git a/tests/ref/fate/iamf-5_1-copy b/tests/ref/fate/iamf-5_1-copy
index d487ea6d63..676c6d22ba 100644
--- a/tests/ref/fate/iamf-5_1-copy
+++ b/tests/ref/fate/iamf-5_1-copy
@@ -1,5 +1,5 @@
-f9315a1ef9a95f590711516a6f88b767 *tests/data/fate/iamf-5_1-copy.iamf
-20190 tests/data/fate/iamf-5_1-copy.iamf
+705719e33dbaff262a12cc5bea412f24 *tests/data/fate/iamf-5_1-copy.iamf
+20202 tests/data/fate/iamf-5_1-copy.iamf
 #extradata 0:       19, 0x3a0e0490
 #extradata 1:       19, 0x3a0e0490
 #extradata 2:       19, 0x3a04048f
diff --git a/tests/ref/fate/iamf-ambisonic_1-projection-copy 
b/tests/ref/fate/iamf-ambisonic_1-projection-copy
index bdf12c5e10..fad4902971 100644
--- a/tests/ref/fate/iamf-ambisonic_1-projection-copy
+++ b/tests/ref/fate/iamf-ambisonic_1-projection-copy
@@ -1,5 +1,5 @@
-9fd745ba5bca8b42b6b80d1c5ecae507 
*tests/data/fate/iamf-ambisonic_1-projection-copy.iamf
-118707 tests/data/fate/iamf-ambisonic_1-projection-copy.iamf
+5ac799e55c8893fbc5455825dc83c5f2 
*tests/data/fate/iamf-ambisonic_1-projection-copy.iamf
+118720 tests/data/fate/iamf-ambisonic_1-projection-copy.iamf
 #extradata 0:       19, 0x3a04048f
 #extradata 1:       19, 0x3a04048f
 #extradata 2:       19, 0x3a04048f

-- 
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]

Reply via email to