]> git.sesse.net Git - ffmpeg/commit
avformat/mp3dec: prefer "fast_seek" to TOC seek for CBR files.
authorChris Cunningham <chcunningham@chromium.org>
Tue, 1 Dec 2015 18:54:38 +0000 (10:54 -0800)
committerwm4 <nfxjfg@googlemail.com>
Wed, 2 Dec 2015 10:02:27 +0000 (11:02 +0100)
commit5e6ce28dabe002a6130f17b59c454bdee33088f7
tree208d9a3949cfb097f87a9f706c033d90fdc7ce54
parente1057babdfb01c53e40a3f68edcc59e1bdad7121
avformat/mp3dec: prefer "fast_seek" to TOC seek for CBR files.

"Fast seek" uses linear interpolation to find the position of the
requested seek time. For CBR this is more direct than using the
mp3 TOC and bypassing the TOC avoids problems with TOC precision.
(see https://crbug.com/545914#c13)

For VBR, fast seek is not precise, so continue to prefer the TOC
when available (the lesser of two evils).

Also, some re-ordering of the logic in mp3_seek to simplify and
give usetoc=1 precedence over fastseek flag.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
libavformat/mp3dec.c
libavformat/seek-test.c
tests/fate/seek.mak