diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-21 19:25:18 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-21 19:47:00 +0200 |
commit | 9d53790ed2814cce59b487e20054ee27251cf062 (patch) | |
tree | 228d7fa1fa1b7ebaf64a5c42ba2293389c6430ff /DOCS | |
parent | 37dbe7f5d07c8b1c4bb8529b87ddca7287ae8bae (diff) | |
download | mpv-9d53790ed2814cce59b487e20054ee27251cf062.tar.bz2 mpv-9d53790ed2814cce59b487e20054ee27251cf062.tar.xz |
core: make initial audio sync more robust against bad demuxers
ogg/ogm demuxers can give first audio packets without timestamp after
a seek. Due to some backwards compatibility code this results in the
sync code getting audio timestamp 0. In this case a lot of audio was
dropped unnecessarily when seeking to a position later in the file, as
the code saw audio starting from 0, video from something larger.
Make the code more robust in two ways. First, add a special case to
not try syncing if we get audio timestamp <= 0 (hopefully there aren't
many files where we'd really get audio starting from 0 and video from
a later timestamp). Second, when throwing audio away, make the code
recalculate from scratch the amount of bytes that still need to be
thrown away after every decode call. This limits the amount of damage
initial too-small timestamps can do, as the code will see the better
timestamps after a while.
Diffstat (limited to 'DOCS')
0 files changed, 0 insertions, 0 deletions