History

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 460132c9980f8a1f501a1f69477bca49e1641233.

Michael Niedermayer committed 6 years ago

Commit 49e766a1 parent 4f33a982 files · +5 −1Browse files

Unified · Split

2 files
  1. libavformat/mp3dec.c +4 −0
  2. tests/ref/fate/gapless-mp3 +1 −1
libavformat/mp3dec.c+4−0
@@ -260,6 +260,10 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st, · 259 unmodified lines
260 st->first_discard_sample = -mp3->end_pad + 528 + 1 + mp3->frames * (int64_t)spf;260 st->first_discard_sample = -mp3->end_pad + 528 + 1 + mp3->frames * (int64_t)spf;
261 st->last_discard_sample = mp3->frames * (int64_t)spf;261 st->last_discard_sample = mp3->frames * (int64_t)spf;
262 }262 }
263 if (!st->start_time)
264 st->start_time = av_rescale_q(st->start_skip_samples,
265 (AVRational){1, c->sample_rate},
266 st->time_base);
263 av_log(s, AV_LOG_DEBUG, "pad %d %d\n", mp3->start_pad, mp3-> end_pad);267 av_log(s, AV_LOG_DEBUG, "pad %d %d\n", mp3->start_pad, mp3-> end_pad);
264 }268 }
265 269
tests/ref/fate/gapless-mp3+1−1
@@ -1,4 +1,4 @@
1ec876434ed65e338e07234e54d136caf *tests/data/fate/gapless-mp3.out-1144b42cc3a898b45507d856d0813f4f26 *tests/data/fate/gapless-mp3.out-1
2c96c3ae7bd3300fd2f4debac222de5b72c96c3ae7bd3300fd2f4debac222de5b7
3ec876434ed65e338e07234e54d136caf *tests/data/fate/gapless-mp3.out-23ec876434ed65e338e07234e54d136caf *tests/data/fate/gapless-mp3.out-2
4c96c3ae7bd3300fd2f4debac222de5b74c96c3ae7bd3300fd2f4debac222de5b7

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t