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

Dale Curtis dalecurtis at chromium.org
Fri Apr 24 02:33:21 EEST 2020


This is a patch Chromium has carried for a while, we forgot to send it
upstream. 7546ac2fee4 made it so that the start_time for mp3 files is
adjusted for skip_samples. However, this appears incorrect because
subsequent packet timestamps are not adjusted and skip_samples are
applied by deleting data from a packet without changing the timestamp.

E.g., we are told the start_time is ~25ms and we get a packet with a
timestamp of 0 that has had the skip_samples discarded from it. As such
rendering engines may incorrectly discard everything prior to the
25ms thinking that is where playback should officially start. Since the
samples were deleted without adjusting timestamps though, the true
start_time is still 0.

Other formats like MP4 with edit lists will adjust both the start
time and the timestamps of subsequent packets to avoid this issue.

Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no_start_time_adjust_v0.patch
Type: application/octet-stream
Size: 2492 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200423/ac3a1025/attachment.obj>


More information about the ffmpeg-devel mailing list