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

Git pushed a commit to branch master
in repository ffmpeg.

commit da04251772a39213aab009972c6dec89dfa56a94
Author:     James Almer <[email protected]>
AuthorDate: Wed Jun 10 18:28:09 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Tue Jun 16 09:18:24 2026 -0300

    avformat/mov: export information about the last actual sample in a stream
    
    This way the generic demux code can calculate how many trimming samples 
should
    be discarded.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavformat/mov.c                                  | 33 +++++++++++++++++++++-
 tests/fate/aac.mak                                 |  6 ++++
 .../fate/audiomatch-afconvert-16000-mono-he-m4a    |  2 +-
 .../fate/audiomatch-afconvert-16000-mono-lc-m4a    |  2 +-
 .../fate/audiomatch-afconvert-16000-stereo-he-m4a  |  2 +-
 .../fate/audiomatch-afconvert-16000-stereo-he2-m4a |  2 +-
 .../fate/audiomatch-afconvert-16000-stereo-lc-m4a  |  2 +-
 .../fate/audiomatch-afconvert-44100-mono-he-m4a    |  2 +-
 .../fate/audiomatch-afconvert-44100-mono-lc-m4a    |  2 +-
 .../fate/audiomatch-afconvert-44100-stereo-he-m4a  |  2 +-
 .../fate/audiomatch-afconvert-44100-stereo-he2-m4a |  2 +-
 .../fate/audiomatch-afconvert-44100-stereo-lc-m4a  |  2 +-
 tests/ref/fate/audiomatch-faac-16000-mono-lc-m4a   |  2 +-
 tests/ref/fate/audiomatch-faac-16000-stereo-lc-m4a |  2 +-
 tests/ref/fate/audiomatch-faac-44100-mono-lc-m4a   |  2 +-
 tests/ref/fate/audiomatch-faac-44100-stereo-lc-m4a |  2 +-
 tests/ref/fate/audiomatch-nero-16000-mono-he-m4a   |  2 +-
 tests/ref/fate/audiomatch-nero-16000-mono-lc-m4a   |  2 +-
 tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a |  2 +-
 .../ref/fate/audiomatch-nero-16000-stereo-he2-m4a  |  2 +-
 tests/ref/fate/audiomatch-nero-16000-stereo-lc-m4a |  2 +-
 tests/ref/fate/audiomatch-nero-44100-mono-he-m4a   |  2 +-
 tests/ref/fate/audiomatch-nero-44100-mono-lc-m4a   |  2 +-
 tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a |  2 +-
 .../ref/fate/audiomatch-nero-44100-stereo-he2-m4a  |  2 +-
 tests/ref/fate/audiomatch-nero-44100-stereo-lc-m4a |  2 +-
 .../fate/audiomatch-quicktime7-44100-stereo-lc-mp4 |  2 +-
 .../fate/audiomatch-quicktimeX-44100-stereo-lc-m4a |  2 +-
 tests/ref/fate/audiomatch-square-aac               |  2 +-
 tests/ref/fate/autorotate                          |  2 +-
 tests/ref/fate/copy-psp                            |  2 +-
 tests/ref/fate/gaplessenc-itunes-to-ipod-aac       | 12 ++++----
 tests/ref/fate/gaplessenc-pcm-to-mov-aac           |  4 +--
 tests/ref/fate/gaplessinfo-itunes1                 |  4 +--
 tests/ref/fate/gaplessinfo-itunes2                 |  4 +--
 tests/ref/fate/generic-tags-remux-mov              |  2 +-
 tests/ref/fate/matroska-dovi-write-config8         |  4 +--
 tests/ref/fate/mov-440hz-10ms                      |  2 +-
 tests/ref/fate/mov-aac-2048-priming                |  2 +-
 tests/ref/fate/segment-adts-to-mkv-header-002      |  2 +-
 tests/ref/fate/segment-adts-to-mkv-header-all      |  2 +-
 41 files changed, 86 insertions(+), 49 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 81c8ceb3e3..a24a7571cf 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5572,7 +5572,22 @@ static int mov_read_custom(MOVContext *c, AVIOContext 
*pb, MOVAtom atom)
             int priming, remainder, samples;
             if(sscanf(val, "%*X %X %X %X", &priming, &remainder, &samples) == 
3){
                 if(priming>0 && priming<16384)
-                    sc->start_pad = priming;
+                    sc->start_pad = priming = av_rescale_q(priming, 
st->time_base,
+                                                           (AVRational){ 1, 
st->codecpar->sample_rate });
+                if (remainder > 0) {
+                    int64_t duration = av_rescale_q(st->duration, 
st->time_base,
+                                                    (AVRational){ 1, 
st->codecpar->sample_rate });
+                    remainder = av_rescale_q(remainder, st->time_base,
+                                             (AVRational){ 1, 
st->codecpar->sample_rate });
+                    samples = av_rescale_q(samples, st->time_base,
+                                           (AVRational){ 1, 
st->codecpar->sample_rate });
+                    if (duration > remainder && duration > samples) {
+                        ffstream(st)->first_discard_sample = duration - 
remainder;
+                        ffstream(st)->last_discard_sample = duration;
+                    }
+                }
+                av_log(c->fc, AV_LOG_DEBUG, "Parsed iTunSMPB: priming %d, 
remainder %d samples %d\n",
+                       priming, remainder, samples);
             }
         }
         if (strcmp(mean, "com.apple.iTunes") == 0 &&
@@ -11634,6 +11649,22 @@ static int mov_finalize_packet(AVFormatContext *s, 
AVStream *st, AVIndexEntry *s
         pkt->pts = pkt->dts;
     }
 
+    if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
+        sc->current_sample >= ffstream(st)->nb_index_entries) {
+        int64_t pts   = av_rescale_q(pkt->pts,     st->time_base, 
(AVRational){ 1, st->codecpar->sample_rate });
+        int64_t total = av_rescale_q(st->duration, st->time_base, 
(AVRational){ 1, st->codecpar->sample_rate });
+        int64_t duration = pkt->duration;
+
+        if (av_sat_add64(pkt->pts, pkt->duration) > st->duration)
+            duration = st->duration - pkt->pts;
+        duration = av_rescale_q(duration, st->time_base, (AVRational){ 1, 
st->codecpar->sample_rate });
+
+        if (!ffstream(st)->first_discard_sample)
+            ffstream(st)->first_discard_sample = av_sat_add64(pts, duration);
+        if (!ffstream(st)->last_discard_sample)
+            ffstream(st)->last_discard_sample  = total;
+    }
+
     if (sc->tts_data && sc->tts_index < sc->tts_count) {
         /* update tts context */
         sc->tts_sample++;
diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 8a7f1da567..cd5d8dc01d 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -65,10 +65,12 @@ fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16
 FATE_AAC += fate-aac-fd_2_c1_ms_0x01
 fate-aac-fd_2_c1_ms_0x01: CMD = pcm -i 
$(TARGET_SAMPLES)/aac/Fd_2_c1_Ms_0x01.mp4
 fate-aac-fd_2_c1_ms_0x01: REF = $(SAMPLES)/aac/Fd_2_c1_Ms_0x01.s16
+fate-aac-fd_2_c1_ms_0x01: SIZE_TOLERANCE = 3052
 
 FATE_AAC += fate-aac-fd_2_c1_ms_0x04
 fate-aac-fd_2_c1_ms_0x04: CMD = pcm -i 
$(TARGET_SAMPLES)/aac/Fd_2_c1_Ms_0x04.mp4
 fate-aac-fd_2_c1_ms_0x04: REF = $(SAMPLES)/aac/Fd_2_c1_Ms_0x04.s16
+fate-aac-fd_2_c1_ms_0x04: SIZE_TOLERANCE = 3436
 
 FATE_AAC += fate-aac-er_ad6000np_44_ep0
 fate-aac-er_ad6000np_44_ep0: CMD = pcm -i 
$(TARGET_SAMPLES)/aac/er_ad6000np_44_ep0.mp4
@@ -77,10 +79,12 @@ fate-aac-er_ad6000np_44_ep0: REF = 
$(SAMPLES)/aac/er_ad6000np_44.s16
 FATE_AAC += fate-aac-er_eld1001np_44_ep0
 fate-aac-er_eld1001np_44_ep0: CMD = pcm -i 
$(TARGET_SAMPLES)/aac/er_eld1001np_44_ep0.mp4
 fate-aac-er_eld1001np_44_ep0: REF = $(SAMPLES)/aac/er_eld1001np_44.s16
+fate-aac-er_eld1001np_44_ep0: SIZE_TOLERANCE = 110
 
 FATE_AAC += fate-aac-er_eld2000np_48_ep0
 fate-aac-er_eld2000np_48_ep0: CMD = pcm -i 
$(TARGET_SAMPLES)/aac/er_eld2000np_48_ep0.mp4
 fate-aac-er_eld2000np_48_ep0: REF = $(SAMPLES)/aac/er_eld2000np_48_ep0.s16
+fate-aac-er_eld2000np_48_ep0: SIZE_TOLERANCE = 128
 
 FATE_AAC += fate-aac-er_eld2100np_48_ep0
 fate-aac-er_eld2100np_48_ep0: CMD = pcm -i 
$(TARGET_SAMPLES)/aac/er_eld2100np_48_ep0.mp4
@@ -137,10 +141,12 @@ fate-aac-fixed-er_ad6000np_44_ep0: REF = 
$(SAMPLES)/aac/er_ad6000np_44.s16
 FATE_AAC_FIXED += fate-aac-fixed-er_eld1001np_44_ep0
 fate-aac-fixed-er_eld1001np_44_ep0: CMD = pcm -c aac_fixed -i 
$(TARGET_SAMPLES)/aac/er_eld1001np_44_ep0.mp4
 fate-aac-fixed-er_eld1001np_44_ep0: REF = $(SAMPLES)/aac/er_eld1001np_44.s16
+fate-aac-fixed-er_eld1001np_44_ep0: SIZE_TOLERANCE = 110
 
 FATE_AAC_FIXED += fate-aac-fixed-er_eld2000np_48_ep0
 fate-aac-fixed-er_eld2000np_48_ep0: CMD = pcm -c aac_fixed -i 
$(TARGET_SAMPLES)/aac/er_eld2000np_48_ep0.mp4
 fate-aac-fixed-er_eld2000np_48_ep0: REF = 
$(SAMPLES)/aac/er_eld2000np_48_ep0.s16
+fate-aac-fixed-er_eld2000np_48_ep0: SIZE_TOLERANCE = 128
 
 fate-aac-ct%: CMD = pcm -i 
$(TARGET_SAMPLES)/aac/CT_DecoderCheck/$(@:fate-aac-ct-%=%)
 fate-aac-ct%: REF = $(SAMPLES)/aac/CT_DecoderCheck/aacPlusv2.wav
diff --git a/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a 
b/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a
index 3db5757845..edd4b475bd 100644
--- a/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a
+++ b/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a
@@ -1 +1 @@
-presig: 1537 postsig:223 lenerr:1760
+presig: 481 postsig:-481 lenerr:0
diff --git a/tests/ref/fate/audiomatch-afconvert-16000-mono-lc-m4a 
b/tests/ref/fate/audiomatch-afconvert-16000-mono-lc-m4a
index a989f60fb1..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-afconvert-16000-mono-lc-m4a
+++ b/tests/ref/fate/audiomatch-afconvert-16000-mono-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:704 lenerr:704
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a 
b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a
index 63dd0119b3..9849bffda6 100644
--- a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a
+++ b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a
@@ -1 +1 @@
-presig: 3074 postsig:446 lenerr:3520
+presig: 962 postsig:-962 lenerr:0
diff --git a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a 
b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a
index 63dd0119b3..9849bffda6 100644
--- a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a
+++ b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a
@@ -1 +1 @@
-presig: 3074 postsig:446 lenerr:3520
+presig: 962 postsig:-962 lenerr:0
diff --git a/tests/ref/fate/audiomatch-afconvert-16000-stereo-lc-m4a 
b/tests/ref/fate/audiomatch-afconvert-16000-stereo-lc-m4a
index c9656e0ae9..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-afconvert-16000-stereo-lc-m4a
+++ b/tests/ref/fate/audiomatch-afconvert-16000-stereo-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:1408 lenerr:1408
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a 
b/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a
index 8900859b42..9849bffda6 100644
--- a/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a
+++ b/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a
@@ -1 +1 @@
-presig: 3074 postsig:822 lenerr:3896
+presig: 962 postsig:-962 lenerr:0
diff --git a/tests/ref/fate/audiomatch-afconvert-44100-mono-lc-m4a 
b/tests/ref/fate/audiomatch-afconvert-44100-mono-lc-m4a
index 49c7df00a5..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-afconvert-44100-mono-lc-m4a
+++ b/tests/ref/fate/audiomatch-afconvert-44100-mono-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:824 lenerr:824
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a 
b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a
index 3f942ce9da..5ea95e4507 100644
--- a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a
+++ b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a
@@ -1 +1 @@
-presig: 6148 postsig:1644 lenerr:7792
+presig: 1924 postsig:-1924 lenerr:0
diff --git a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a 
b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a
index 3f942ce9da..5ea95e4507 100644
--- a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a
+++ b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a
@@ -1 +1 @@
-presig: 6148 postsig:1644 lenerr:7792
+presig: 1924 postsig:-1924 lenerr:0
diff --git a/tests/ref/fate/audiomatch-afconvert-44100-stereo-lc-m4a 
b/tests/ref/fate/audiomatch-afconvert-44100-stereo-lc-m4a
index 14c8194797..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-afconvert-44100-stereo-lc-m4a
+++ b/tests/ref/fate/audiomatch-afconvert-44100-stereo-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:1648 lenerr:1648
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-faac-16000-mono-lc-m4a 
b/tests/ref/fate/audiomatch-faac-16000-mono-lc-m4a
index 8822bd1893..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-faac-16000-mono-lc-m4a
+++ b/tests/ref/fate/audiomatch-faac-16000-mono-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:768 lenerr:768
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-faac-16000-stereo-lc-m4a 
b/tests/ref/fate/audiomatch-faac-16000-stereo-lc-m4a
index 464f5161ce..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-faac-16000-stereo-lc-m4a
+++ b/tests/ref/fate/audiomatch-faac-16000-stereo-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:1536 lenerr:1536
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-faac-44100-mono-lc-m4a 
b/tests/ref/fate/audiomatch-faac-44100-mono-lc-m4a
index b94780c040..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-faac-44100-mono-lc-m4a
+++ b/tests/ref/fate/audiomatch-faac-44100-mono-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:888 lenerr:888
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-faac-44100-stereo-lc-m4a 
b/tests/ref/fate/audiomatch-faac-44100-stereo-lc-m4a
index fd676ae675..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-faac-44100-stereo-lc-m4a
+++ b/tests/ref/fate/audiomatch-faac-44100-stereo-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:1776 lenerr:1776
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a 
b/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a
index 7d23fa4368..0c8a568738 100644
--- a/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a
+++ b/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a
@@ -1 +1 @@
-presig: 2332 postsig:196 lenerr:2528
+presig: -4 postsig:4 lenerr:0
diff --git a/tests/ref/fate/audiomatch-nero-16000-mono-lc-m4a 
b/tests/ref/fate/audiomatch-nero-16000-mono-lc-m4a
index c26540e82e..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-nero-16000-mono-lc-m4a
+++ b/tests/ref/fate/audiomatch-nero-16000-mono-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:192 lenerr:192
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a 
b/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a
index 5b2f18c6ee..88dbfbb8ef 100644
--- a/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a
+++ b/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a
@@ -1 +1 @@
-presig: 4664 postsig:392 lenerr:5056
+presig: -8 postsig:8 lenerr:0
diff --git a/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a 
b/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a
index 20ddfe94d1..eee301f6e1 100644
--- a/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a
+++ b/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a
@@ -1 +1 @@
-presig: 5618 postsig:2590 lenerr:8208
+presig: 2 postsig:-2 lenerr:0
diff --git a/tests/ref/fate/audiomatch-nero-16000-stereo-lc-m4a 
b/tests/ref/fate/audiomatch-nero-16000-stereo-lc-m4a
index f3461d5ce5..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-nero-16000-stereo-lc-m4a
+++ b/tests/ref/fate/audiomatch-nero-16000-stereo-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:384 lenerr:384
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a 
b/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a
index fe53516c0f..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a
+++ b/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a
@@ -1 +1 @@
-presig: 2336 postsig:1336 lenerr:3672
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-nero-44100-mono-lc-m4a 
b/tests/ref/fate/audiomatch-nero-44100-mono-lc-m4a
index b71876c5e6..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-nero-44100-mono-lc-m4a
+++ b/tests/ref/fate/audiomatch-nero-44100-mono-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:312 lenerr:312
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a 
b/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a
index 5e98909501..a3a4f4d179 100644
--- a/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a
+++ b/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a
@@ -1 +1 @@
-presig: 4670 postsig:2674 lenerr:7344
+presig: -2 postsig:2 lenerr:0
diff --git a/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a 
b/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a
index 627ee784b6..eee301f6e1 100644
--- a/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a
+++ b/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a
@@ -1 +1 @@
-presig: 5618 postsig:782 lenerr:6400
+presig: 2 postsig:-2 lenerr:0
diff --git a/tests/ref/fate/audiomatch-nero-44100-stereo-lc-m4a 
b/tests/ref/fate/audiomatch-nero-44100-stereo-lc-m4a
index 4f9c9f46c3..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-nero-44100-stereo-lc-m4a
+++ b/tests/ref/fate/audiomatch-nero-44100-stereo-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:624 lenerr:624
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-quicktime7-44100-stereo-lc-mp4 
b/tests/ref/fate/audiomatch-quicktime7-44100-stereo-lc-mp4
index 761deaf1dd..d63fdbcb46 100644
--- a/tests/ref/fate/audiomatch-quicktime7-44100-stereo-lc-mp4
+++ b/tests/ref/fate/audiomatch-quicktime7-44100-stereo-lc-mp4
@@ -1 +1 @@
-presig: 4220 postsig:-2444 lenerr:1776
+presig: 4220 postsig:-4220 lenerr:0
diff --git a/tests/ref/fate/audiomatch-quicktimeX-44100-stereo-lc-m4a 
b/tests/ref/fate/audiomatch-quicktimeX-44100-stereo-lc-m4a
index 14c8194797..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-quicktimeX-44100-stereo-lc-m4a
+++ b/tests/ref/fate/audiomatch-quicktimeX-44100-stereo-lc-m4a
@@ -1 +1 @@
-presig: 0 postsig:1648 lenerr:1648
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/audiomatch-square-aac 
b/tests/ref/fate/audiomatch-square-aac
index 04a2799619..1d29bafeda 100644
--- a/tests/ref/fate/audiomatch-square-aac
+++ b/tests/ref/fate/audiomatch-square-aac
@@ -1 +1 @@
-presig: 0 postsig:892 lenerr:892
+presig: 0 postsig:0 lenerr:0
diff --git a/tests/ref/fate/autorotate b/tests/ref/fate/autorotate
index a1b9ccf379..ec2044f7eb 100644
--- a/tests/ref/fate/autorotate
+++ b/tests/ref/fate/autorotate
@@ -1,4 +1,4 @@
-72bba4531b2251bf7d08bc1f0dba656b *tests/data/fate/autorotate.mov
+c57662975b92b9403341271944e2645d *tests/data/fate/autorotate.mov
 197366 tests/data/fate/autorotate.mov
 #extradata 0:       34, 0x9d7d073f
 #tb 0: 1/15360
diff --git a/tests/ref/fate/copy-psp b/tests/ref/fate/copy-psp
index 4075a58e6e..448199f9cf 100644
--- a/tests/ref/fate/copy-psp
+++ b/tests/ref/fate/copy-psp
@@ -262,7 +262,7 @@
 0,     288288,     288288,     3003,    15613, 0x8a293998, F=0x0
 1,     154624,     154624,     1025,      234, 0xa08f77cc
 0,     291291,     291291,     3003,    12489, 0xbfba1313, F=0x0
-1,     155649,     155649,     1023,      231, 0xab257042
+1,     155649,     155649,     1023,      231, 0xab257042, S=1, Skip Samples,  
     10, 0x00060001
 0,     294294,     294294,     3003,    18231, 0xaaaa9157, F=0x0
 0,     297297,     297297,     3003,    19204, 0x18c54ec1, F=0x0
 0,     300300,     300300,     3003,    19047, 0x6cb3e900, F=0x0
diff --git a/tests/ref/fate/gaplessenc-itunes-to-ipod-aac 
b/tests/ref/fate/gaplessenc-itunes-to-ipod-aac
index b3e0b052ae..8e18cbb49e 100644
--- a/tests/ref/fate/gaplessenc-itunes-to-ipod-aac
+++ b/tests/ref/fate/gaplessenc-itunes-to-ipod-aac
@@ -1,11 +1,11 @@
 [STREAM]
 index=0
 start_pts=0
-duration_ts=103360
+duration_ts=102400
 [/STREAM]
 [FORMAT]
 start_time=0.000000
-duration=2.343764
+duration=2.321995
 [/FORMAT]
 packet|pts=-1024|dts=-1024|duration=1024|flags=KD_|
 packet|pts=0|dts=0|duration=1024|flags=K__
@@ -15,6 +15,7 @@ packet|pts=3072|dts=3072|duration=1024|flags=K__
 packet|pts=4096|dts=4096|duration=1024|flags=K__
 packet|pts=5120|dts=5120|duration=1024|flags=K__
 packet|pts=6144|dts=6144|duration=1024|flags=K__
+packet|pts=94208|dts=94208|duration=1024|flags=K__
 packet|pts=95232|dts=95232|duration=1024|flags=K__
 packet|pts=96256|dts=96256|duration=1024|flags=K__
 packet|pts=97280|dts=97280|duration=1024|flags=K__
@@ -22,8 +23,7 @@ packet|pts=98304|dts=98304|duration=1024|flags=K__
 packet|pts=99328|dts=99328|duration=1024|flags=K__
 packet|pts=100352|dts=100352|duration=1024|flags=K__
 packet|pts=101376|dts=101376|duration=1024|flags=K__
-packet|pts=102400|dts=102400|duration=960|flags=K__
-stream|nb_read_packets=102
+stream|nb_read_packets=101
 frame|pts=0|pkt_dts=0|best_effort_timestamp=0|nb_samples=1024
 frame|pts=1024|pkt_dts=1024|best_effort_timestamp=1024|nb_samples=1024
 frame|pts=2048|pkt_dts=2048|best_effort_timestamp=2048|nb_samples=1024
@@ -32,6 +32,7 @@ 
frame|pts=4096|pkt_dts=4096|best_effort_timestamp=4096|nb_samples=1024
 frame|pts=5120|pkt_dts=5120|best_effort_timestamp=5120|nb_samples=1024
 frame|pts=6144|pkt_dts=6144|best_effort_timestamp=6144|nb_samples=1024
 frame|pts=7168|pkt_dts=7168|best_effort_timestamp=7168|nb_samples=1024
+frame|pts=94208|pkt_dts=94208|best_effort_timestamp=94208|nb_samples=1024
 frame|pts=95232|pkt_dts=95232|best_effort_timestamp=95232|nb_samples=1024
 frame|pts=96256|pkt_dts=96256|best_effort_timestamp=96256|nb_samples=1024
 frame|pts=97280|pkt_dts=97280|best_effort_timestamp=97280|nb_samples=1024
@@ -39,5 +40,4 @@ 
frame|pts=98304|pkt_dts=98304|best_effort_timestamp=98304|nb_samples=1024
 frame|pts=99328|pkt_dts=99328|best_effort_timestamp=99328|nb_samples=1024
 frame|pts=100352|pkt_dts=100352|best_effort_timestamp=100352|nb_samples=1024
 frame|pts=101376|pkt_dts=101376|best_effort_timestamp=101376|nb_samples=1024
-frame|pts=102400|pkt_dts=102400|best_effort_timestamp=102400|nb_samples=1024
-stream|nb_read_frames=101
+stream|nb_read_frames=100
diff --git a/tests/ref/fate/gaplessenc-pcm-to-mov-aac 
b/tests/ref/fate/gaplessenc-pcm-to-mov-aac
index 09ffaed58d..7a6edc7e70 100644
--- a/tests/ref/fate/gaplessenc-pcm-to-mov-aac
+++ b/tests/ref/fate/gaplessenc-pcm-to-mov-aac
@@ -22,7 +22,7 @@ packet|pts=524288|dts=524288|duration=1024|flags=K__
 packet|pts=525312|dts=525312|duration=1024|flags=K__
 packet|pts=526336|dts=526336|duration=1024|flags=K__
 packet|pts=527360|dts=527360|duration=1024|flags=K__
-packet|pts=528384|dts=528384|duration=816|flags=K__
+packet|pts=528384|dts=528384|duration=816|flags=K__|
 stream|nb_read_packets=518
 frame|pts=0|pkt_dts=0|best_effort_timestamp=0|nb_samples=1024
 frame|pts=1024|pkt_dts=1024|best_effort_timestamp=1024|nb_samples=1024
@@ -39,5 +39,5 @@ 
frame|pts=524288|pkt_dts=524288|best_effort_timestamp=524288|nb_samples=1024
 frame|pts=525312|pkt_dts=525312|best_effort_timestamp=525312|nb_samples=1024
 frame|pts=526336|pkt_dts=526336|best_effort_timestamp=526336|nb_samples=1024
 frame|pts=527360|pkt_dts=527360|best_effort_timestamp=527360|nb_samples=1024
-frame|pts=528384|pkt_dts=528384|best_effort_timestamp=528384|nb_samples=1024
+frame|pts=528384|pkt_dts=528384|best_effort_timestamp=528384|nb_samples=816
 stream|nb_read_frames=517
diff --git a/tests/ref/fate/gaplessinfo-itunes1 
b/tests/ref/fate/gaplessinfo-itunes1
index f888130d8a..beb58a8363 100644
--- a/tests/ref/fate/gaplessinfo-itunes1
+++ b/tests/ref/fate/gaplessinfo-itunes1
@@ -22,7 +22,7 @@ packet|pts=1289216|dts=1289216|duration=1024|flags=K__
 packet|pts=1290240|dts=1290240|duration=1024|flags=K__
 packet|pts=1291264|dts=1291264|duration=1024|flags=K__
 packet|pts=1292288|dts=1292288|duration=1024|flags=K__
-packet|pts=1293312|dts=1293312|duration=1024|flags=K__
+packet|pts=1293312|dts=1293312|duration=1024|flags=K__|
 stream|nb_read_packets=1264
 frame|pts=2112|pkt_dts=2112|best_effort_timestamp=2112|nb_samples=960
 frame|pts=3072|pkt_dts=3072|best_effort_timestamp=3072|nb_samples=1024
@@ -39,5 +39,5 @@ 
frame|pts=1289216|pkt_dts=1289216|best_effort_timestamp=1289216|nb_samples=1024
 frame|pts=1290240|pkt_dts=1290240|best_effort_timestamp=1290240|nb_samples=1024
 frame|pts=1291264|pkt_dts=1291264|best_effort_timestamp=1291264|nb_samples=1024
 frame|pts=1292288|pkt_dts=1292288|best_effort_timestamp=1292288|nb_samples=1024
-frame|pts=1293312|pkt_dts=1293312|best_effort_timestamp=1293312|nb_samples=1024
+frame|pts=1293312|pkt_dts=1293312|best_effort_timestamp=1293312|nb_samples=515
 stream|nb_read_frames=1262
diff --git a/tests/ref/fate/gaplessinfo-itunes2 
b/tests/ref/fate/gaplessinfo-itunes2
index 057e282305..69b9af44a3 100644
--- a/tests/ref/fate/gaplessinfo-itunes2
+++ b/tests/ref/fate/gaplessinfo-itunes2
@@ -22,7 +22,7 @@ packet|pts=100352|dts=100352|duration=1024|flags=K__
 packet|pts=101376|dts=101376|duration=1024|flags=K__
 packet|pts=102400|dts=102400|duration=1024|flags=K__
 packet|pts=103424|dts=103424|duration=1024|flags=K__
-packet|pts=104448|dts=104448|duration=1024|flags=K__
+packet|pts=104448|dts=104448|duration=1024|flags=K__|
 stream|nb_read_packets=103
 frame|pts=2112|pkt_dts=2112|best_effort_timestamp=2112|nb_samples=960
 frame|pts=3072|pkt_dts=3072|best_effort_timestamp=3072|nb_samples=1024
@@ -39,5 +39,5 @@ 
frame|pts=100352|pkt_dts=100352|best_effort_timestamp=100352|nb_samples=1024
 frame|pts=101376|pkt_dts=101376|best_effort_timestamp=101376|nb_samples=1024
 frame|pts=102400|pkt_dts=102400|best_effort_timestamp=102400|nb_samples=1024
 frame|pts=103424|pkt_dts=103424|best_effort_timestamp=103424|nb_samples=1024
-frame|pts=104448|pkt_dts=104448|best_effort_timestamp=104448|nb_samples=1024
+frame|pts=104448|pkt_dts=104448|best_effort_timestamp=104448|nb_samples=64
 stream|nb_read_frames=101
diff --git a/tests/ref/fate/generic-tags-remux-mov 
b/tests/ref/fate/generic-tags-remux-mov
index 3f4d240543..f66e2cec7c 100644
--- a/tests/ref/fate/generic-tags-remux-mov
+++ b/tests/ref/fate/generic-tags-remux-mov
@@ -50,7 +50,7 @@
 0,      40960,      40960,     1024,      192, 0x72736037
 0,      41984,      41984,     1024,      204, 0xb1c26c14
 0,      43008,      43008,     1024,      252, 0x2b818d52
-0,      44032,      44032,       68,        5, 0x03c001be
+0,      44032,      44032,       68,        5, 0x03c001be, S=1, Skip Samples,  
     10, 0x047700bf
 [FORMAT]
 TAG:major_brand=isom
 TAG:minor_version=512
diff --git a/tests/ref/fate/matroska-dovi-write-config8 
b/tests/ref/fate/matroska-dovi-write-config8
index 43a703bb25..14aadd3f74 100644
--- a/tests/ref/fate/matroska-dovi-write-config8
+++ b/tests/ref/fate/matroska-dovi-write-config8
@@ -1,5 +1,5 @@
-6562aa21af7d0e8ef44c9bca106731cb 
*tests/data/fate/matroska-dovi-write-config8.matroska
-3600625 tests/data/fate/matroska-dovi-write-config8.matroska
+414d901156c2bc727c7b9b389e3ca1b5 
*tests/data/fate/matroska-dovi-write-config8.matroska
+3600635 tests/data/fate/matroska-dovi-write-config8.matroska
 #extradata 0:      551, 0xb1ddcd66
 #extradata 1:        2, 0x00340022
 #tb 0: 1/1000
diff --git a/tests/ref/fate/mov-440hz-10ms b/tests/ref/fate/mov-440hz-10ms
index 77b50d262c..2374c6ebd1 100644
--- a/tests/ref/fate/mov-440hz-10ms
+++ b/tests/ref/fate/mov-440hz-10ms
@@ -7,4 +7,4 @@
 #sample_rate 0: 44100
 #channel_layout_name 0: mono
 #stream#, dts,        pts, duration,     size, hash
-0,          0,          0,      960,     1920, 44e7e48ff08835ce30e93c7971dae7df
+0,          0,          0,      441,      882, 6f99699127cee2b37d6adc0e2a4c31a7
diff --git a/tests/ref/fate/mov-aac-2048-priming 
b/tests/ref/fate/mov-aac-2048-priming
index feea5e36eb..6bbc9e20f8 100644
--- a/tests/ref/fate/mov-aac-2048-priming
+++ b/tests/ref/fate/mov-aac-2048-priming
@@ -214,4 +214,4 @@ 
packet|codec_type=audio|stream_index=0|pts=215040|pts_time=4.876190|dts=215040|d
 
packet|codec_type=audio|stream_index=0|pts=216064|pts_time=4.899410|dts=216064|dts_time=4.899410|duration=1024|duration_time=0.023220|size=203|pos=42900|flags=K__
 
packet|codec_type=audio|stream_index=0|pts=217088|pts_time=4.922630|dts=217088|dts_time=4.922630|duration=1024|duration_time=0.023220|size=198|pos=43103|flags=K__
 
packet|codec_type=audio|stream_index=0|pts=218112|pts_time=4.945850|dts=218112|dts_time=4.945850|duration=1024|duration_time=0.023220|size=284|pos=43301|flags=K__
-packet|codec_type=audio|stream_index=0|pts=219136|pts_time=4.969070|dts=219136|dts_time=4.969070|duration=340|duration_time=0.007710|size=5|pos=43585|flags=K__
+packet|codec_type=audio|stream_index=0|pts=219136|pts_time=4.969070|dts=219136|dts_time=4.969070|duration=340|duration_time=0.007710|size=5|pos=43585|flags=K__|side_datum/skip_samples:side_data_type=Skip
 
Samples|side_datum/skip_samples:skip_samples=0|side_datum/skip_samples:discard_padding=684|side_datum/skip_samples:skip_reason=0|side_datum/skip_samples:discard_reason=0
diff --git a/tests/ref/fate/segment-adts-to-mkv-header-002 
b/tests/ref/fate/segment-adts-to-mkv-header-002
index fc42d8ad00..919fedd476 100644
--- a/tests/ref/fate/segment-adts-to-mkv-header-002
+++ b/tests/ref/fate/segment-adts-to-mkv-header-002
@@ -6,4 +6,4 @@
 #channel_layout_name 0: mono
 0,          0,          0,       64,      156, 0x867d4f3a
 0,         64,         64,       64,      201, 0x62745ff9
-0,        128,        128,       64,      137, 0x90c639e0
+0,        128,        128,       64,      137, 0x90c639e0, S=1, Skip Samples,  
     10, 0x048a00c2
diff --git a/tests/ref/fate/segment-adts-to-mkv-header-all 
b/tests/ref/fate/segment-adts-to-mkv-header-all
index dd2ec9a99e..125b684c03 100644
--- a/tests/ref/fate/segment-adts-to-mkv-header-all
+++ b/tests/ref/fate/segment-adts-to-mkv-header-all
@@ -37,4 +37,4 @@
 0,       1920,       1920,       64,      177, 0xb8c355d5
 0,       1984,       1984,       64,      156, 0x867d4f3a
 0,       2048,       2048,       64,      201, 0x62745ff9
-0,       2112,       2112,       64,      137, 0x90c639e0
+0,       2112,       2112,       64,      137, 0x90c639e0, S=1, Skip Samples,  
     10, 0x048a00c2

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

Reply via email to