Revert "lavf/mp3dec: don't adjust start time; packets are not adjusted."

This causes regressions in end to end timestamps with mp3s and ffmpeg.
The revert is to avoid this regression in the 4.3 release

See: [FFmpeg-devel] [PATCH] Don't adjust start time for MP3 files; packets are not adjusted.

This reverts commit 460132c998.
This commit is contained in:
Michael Niedermayer 2020-06-08 22:08:37 +02:00
parent 4f33a9803a
commit 49e766aa4c
2 changed files with 5 additions and 1 deletions

View File

@ -260,6 +260,10 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st,
st->first_discard_sample = -mp3->end_pad + 528 + 1 + mp3->frames * (int64_t)spf; st->first_discard_sample = -mp3->end_pad + 528 + 1 + mp3->frames * (int64_t)spf;
st->last_discard_sample = mp3->frames * (int64_t)spf; st->last_discard_sample = mp3->frames * (int64_t)spf;
} }
if (!st->start_time)
st->start_time = av_rescale_q(st->start_skip_samples,
(AVRational){1, c->sample_rate},
st->time_base);
av_log(s, AV_LOG_DEBUG, "pad %d %d\n", mp3->start_pad, mp3-> end_pad); av_log(s, AV_LOG_DEBUG, "pad %d %d\n", mp3->start_pad, mp3-> end_pad);
} }

View File

@ -1,4 +1,4 @@
ec876434ed65e338e07234e54d136caf *tests/data/fate/gapless-mp3.out-1 44b42cc3a898b45507d856d0813f4f26 *tests/data/fate/gapless-mp3.out-1
c96c3ae7bd3300fd2f4debac222de5b7 c96c3ae7bd3300fd2f4debac222de5b7
ec876434ed65e338e07234e54d136caf *tests/data/fate/gapless-mp3.out-2 ec876434ed65e338e07234e54d136caf *tests/data/fate/gapless-mp3.out-2
c96c3ae7bd3300fd2f4debac222de5b7 c96c3ae7bd3300fd2f4debac222de5b7