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

Git pushed a commit to branch master
in repository ffmpeg.

commit 1b3d97a50431e2a3a4f17bf7ec9c6d7c7e0515ee
Author:     Baptiste Coudurier <[email protected]>
AuthorDate: Sat Nov 14 16:44:25 2026 -0800
Commit:     Baptiste Coudurier <[email protected]>
CommitDate: Sun Nov 15 23:48:00 2026 +0000

    avformat/mp3dec: expose initial padding during header parsing
---
 libavformat/mp3dec.c                 | 4 +++-
 tests/ref/fate/gapless-mp3-side-data | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index d326b9947f..12d0811ba4 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -416,10 +416,12 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, 
AVStream *st, int64_t base)
     mp3_parse_itunes_smpb(s, st, c, spf);
 
     /* Packets keep the skipped samples, so shift the timeline instead. */
-    if (ffstream(st)->start_skip_samples)
+    if (ffstream(st)->start_skip_samples) {
+        st->codecpar->initial_padding = ffstream(st)->start_skip_samples;
         st->start_time = av_rescale_q(ffstream(st)->start_skip_samples,
                                       (AVRational){1, c->sample_rate},
                                       st->time_base);
+    }
 
     if (!mp3->frames && !mp3->header_filesize) {
         ret = -1;
diff --git a/tests/ref/fate/gapless-mp3-side-data 
b/tests/ref/fate/gapless-mp3-side-data
index 221d6fab13..425a7f3548 100644
--- a/tests/ref/fate/gapless-mp3-side-data
+++ b/tests/ref/fate/gapless-mp3-side-data
@@ -593,5 +593,5 @@ 
packet|codec_type=audio|stream_index=0|pts=217866240|pts_time=15.438367|dts=2178
 
packet|codec_type=audio|stream_index=0|pts=218234880|pts_time=15.464490|dts=218234880|dts_time=15.464490|duration=368640|duration_time=0.026122|size=418|pos=248882|flags=K__|data_hash=CRC32:fbc83c3c
 
packet|codec_type=audio|stream_index=0|pts=218603520|pts_time=15.490612|dts=218603520|dts_time=15.490612|duration=368640|duration_time=0.026122|size=418|pos=249300|flags=K__|data_hash=CRC32:d5fb5f9c|side_datum/skip_samples:side_data_type=Skip
 
Samples|side_datum/skip_samples:skip_samples=0|side_datum/skip_samples:discard_padding=303|side_datum/skip_samples:skip_reason=0|side_datum/skip_samples:discard_reason=0
 
packet|codec_type=audio|stream_index=0|pts=218972160|pts_time=15.516735|dts=218972160|dts_time=15.516735|duration=368640|duration_time=0.026122|size=418|pos=249718|flags=K__|data_hash=CRC32:3789f3cf|side_datum/skip_samples:side_data_type=Skip
 
Samples|side_datum/skip_samples:skip_samples=0|side_datum/skip_samples:discard_padding=1152|side_datum/skip_samples:skip_reason=0|side_datum/skip_samples:discard_reason=0
-stream|index=0|codec_name=mp3|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|mime_codec_string=mp4a.40.34|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|seek_preroll=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/14112000|start_pts=353600|start_time=0.025057|duration_ts=218521600|duration=15.484807|bit_rate=128000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_fram
 [...]
+stream|index=0|codec_name=mp3|profile=unknown|level=-99|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|mime_codec_string=mp4a.40.34|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=1105|seek_preroll=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/14112000|start_pts=353600|start_time=0.025057|duration_ts=218521600|duration=15.484807|bit_rate=128000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_f
 [...]
 
format|filename=gapless.mp3|nb_streams=1|nb_programs=0|nb_stream_groups=0|format_name=mp3|start_time=0.025057|duration=15.484807|size=250264|bit_rate=129295|probe_score=52|tag:title=test

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