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

Git pushed a commit to branch master
in repository ffmpeg.

commit 0880458e4c27337718ca836e1193803a089fc690
Author:     James Almer <[email protected]>
AuthorDate: Mon Feb 2 16:49:01 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Thu Feb 5 23:21:49 2026 -0300

    avformat/matroskadec: take into account priming samples in audio tracks
    
    Signed-off-by: James Almer <[email protected]>
---
 libavformat/matroskadec.c              | 1 +
 tests/ref/fate/matroska-encoding-delay | 9 ++++++++-
 tests/ref/fate/matroska-ogg-opus-remux | 9 ++++++++-
 tests/ref/fate/matroska-opus-remux     | 9 ++++++++-
 tests/ref/lavf/mkv                     | 2 +-
 tests/ref/lavf/mkv_attachment          | 2 +-
 6 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 8b5eda8213..503b99b286 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2860,6 +2860,7 @@ static int mka_parse_audio(MatroskaTrack *track, AVStream 
*st,
                                             (AVRational){1, 1000000000},
                                             (AVRational){1, par->codec_id == 
AV_CODEC_ID_OPUS ?
                                                             48000 : 
par->sample_rate});
+        sti->skip_samples = par->initial_padding;
     }
     if (track->seek_preroll > 0) {
         par->seek_preroll = av_rescale_q(track->seek_preroll,
diff --git a/tests/ref/fate/matroska-encoding-delay 
b/tests/ref/fate/matroska-encoding-delay
index 31d00882a4..ad1edad1e8 100644
--- a/tests/ref/fate/matroska-encoding-delay
+++ b/tests/ref/fate/matroska-encoding-delay
@@ -11,7 +11,7 @@ ece637ed28526724c88f5c69b8bf7d6f 
*tests/data/fate/matroska-encoding-delay.matros
 #codec_id 1: mp2
 #sample_rate 1: 48000
 #channel_layout_name 1: stereo
-1,        -10,        -10,       24,     1152, 0x724077b8
+1,        -10,        -10,       24,     1152, 0x724077b8, S=1, Skip Samples,  
     10, 0x08d300e2
 0,          0,          0,       40,   237628, 0xeff25579
 1,         14,         14,       24,     1152, 0x80625572
 1,         38,         38,       24,     1152, 0x7d7f4dce
@@ -34,6 +34,13 @@ duration_time=0.024000
 size=1152
 pos=1263
 flags=K__
+[SIDE_DATA]
+side_data_type=Skip Samples
+skip_samples=481
+discard_padding=0
+skip_reason=0
+discard_reason=0
+[/SIDE_DATA]
 [/PACKET]
 [PACKET]
 codec_type=video
diff --git a/tests/ref/fate/matroska-ogg-opus-remux 
b/tests/ref/fate/matroska-ogg-opus-remux
index 1ea6ce3b4d..6e0d91a2d4 100644
--- a/tests/ref/fate/matroska-ogg-opus-remux
+++ b/tests/ref/fate/matroska-ogg-opus-remux
@@ -6,7 +6,7 @@
 #codec_id 0: opus
 #sample_rate 0: 48000
 #channel_layout_name 0: stereo
-0,         -7,         -7,       20,      402, 0x89b1c40f
+0,         -7,         -7,       20,      402, 0x89b1c40f, S=1, Skip Samples,  
     10, 0x03f10065
 0,         13,         13,       20,      216, 0x7bf97146
 0,         33,         33,       20,      215, 0x6cb86d8b
 0,         53,         53,       20,      218, 0x9cfd691c
@@ -59,6 +59,13 @@ duration_time=0.020000
 size=402
 pos=543
 flags=K__
+[SIDE_DATA]
+side_data_type=Skip Samples
+skip_samples=356
+discard_padding=0
+skip_reason=0
+discard_reason=0
+[/SIDE_DATA]
 [/PACKET]
 [PACKET]
 codec_type=audio
diff --git a/tests/ref/fate/matroska-opus-remux 
b/tests/ref/fate/matroska-opus-remux
index 9e1284a9ec..9af4250034 100644
--- a/tests/ref/fate/matroska-opus-remux
+++ b/tests/ref/fate/matroska-opus-remux
@@ -6,7 +6,7 @@ b9881205f8945fefc16a6f23474071a6 
*tests/data/fate/matroska-opus-remux.matroska
 #codec_id 0: opus
 #sample_rate 0: 48000
 #channel_layout_name 0: mono
-0,         -7,         -7,       20,      320, 0x58b9a88d
+0,         -7,         -7,       20,      320, 0x58b9a88d, S=1, Skip Samples,  
     10, 0x02390039
 0,         14,         14,       20,      159, 0x6c9c4b4c
 0,         34,         34,       20,      148, 0x0caf4b5d
 0,         54,         54,       20,      139, 0xc5624226
@@ -70,6 +70,13 @@ duration_time=0.020000
 size=320
 pos=499
 flags=K__
+[SIDE_DATA]
+side_data_type=Skip Samples
+skip_samples=312
+discard_padding=0
+skip_reason=0
+discard_reason=0
+[/SIDE_DATA]
 [/PACKET]
 [PACKET]
 codec_type=audio
diff --git a/tests/ref/lavf/mkv b/tests/ref/lavf/mkv
index 5a3c3b931e..94605b3f4c 100644
--- a/tests/ref/lavf/mkv
+++ b/tests/ref/lavf/mkv
@@ -1,3 +1,3 @@
 dd709c2b5e173eaca39cdd4a10aac3ec *tests/data/lavf/lavf.mkv
 320447 tests/data/lavf/lavf.mkv
-tests/data/lavf/lavf.mkv CRC=0xec6c3c68
+tests/data/lavf/lavf.mkv CRC=0x29d44368
diff --git a/tests/ref/lavf/mkv_attachment b/tests/ref/lavf/mkv_attachment
index 1a086a4f24..6effac49e1 100644
--- a/tests/ref/lavf/mkv_attachment
+++ b/tests/ref/lavf/mkv_attachment
@@ -1,3 +1,3 @@
 7cd7b06892b74d66da217c8dda90bfac *tests/data/lavf/lavf.mkv_attachment
 472597 tests/data/lavf/lavf.mkv_attachment
-tests/data/lavf/lavf.mkv_attachment CRC=0xec6c3c68
+tests/data/lavf/lavf.mkv_attachment CRC=0x29d44368

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

Reply via email to