diff options
author | dalecurtis <dalecurtis@chromium.org> | 2015-08-06 19:59:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-07 02:59:52 +0000 |
commit | aa958fd3a80afdfdc2f747a819a1c67605c637e6 (patch) | |
tree | 117e88fb753235af587b6ddf36d1525fa9c8849d /media/base | |
parent | b24f45595e1f29fd3ff04ea0c53ef14785ce9289 (diff) | |
download | chromium_src-aa958fd3a80afdfdc2f747a819a1c67605c637e6.zip chromium_src-aa958fd3a80afdfdc2f747a819a1c67605c637e6.tar.gz chromium_src-aa958fd3a80afdfdc2f747a819a1c67605c637e6.tar.bz2 |
Fix incorrect opus seek preroll and flaky pre-skip removal.
Opus seek preroll was being treated as decoder delay when it really
just means that for seeking to a time T, we need to decode packets
starting from time "T - seek_preroll" and throw them away. Instead
we were discarding time [T, T+seek_preroll] and shifting the
timestamps backwards to accommodate the deletion.
For pre-skip, we would assume the first packet seen by the decoder
was the timestamp for which pre-skip should be applied. However,
this is incorrect and pre-skip should always be dropped because
timestamp zero represents the beginning of the pre-skip, which
causes all future timestamps to be displaced by pre-skip duration.
This patch fixes pre-skip and seek preroll for src= and pre-skip only
for MSE. ChunkDemuxer needs to be modified to support preroll. src=
is fixed by expanding the hacks in place for negative ogg timestamps
to handle negative timestamps from ffmpeg in a more general manner.
This patch also adds test cases for the seeking cases (one of which MSE
can pass because the test clip has a codec delay > seek preroll).
Since these tests would otherwise take some time to run, this also
adds support for clockless hashed pipeline integration tests.
BUG=509894
TEST=OpusAudioDecoder and OPUS PipelineIntegration tests pass
w/o expectations modification. New trimming pipeline tests.
New FFmpegDemuxerTest to verify audio/video timestamp sync.
Review URL: https://codereview.chromium.org/1260193005
Cr-Commit-Position: refs/heads/master@{#342274}
Diffstat (limited to 'media/base')
-rw-r--r-- | media/base/audio_discard_helper.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/media/base/audio_discard_helper.cc b/media/base/audio_discard_helper.cc index f7c645c..12c8e34 100644 --- a/media/base/audio_discard_helper.cc +++ b/media/base/audio_discard_helper.cc @@ -104,11 +104,8 @@ bool AudioDiscardHelper::ProcessBuffers( // If everything would be discarded, indicate a new buffer is required. if (frames_to_discard == decoded_frames) { - // For simplicity disallow cases where a buffer with discard padding is - // present. Doing so allows us to avoid complexity around tracking - // discards across buffers. - DCHECK(current_discard_padding.first == base::TimeDelta()); - DCHECK(current_discard_padding.second == base::TimeDelta()); + // For simplicity, we just drop any discard padding if |discard_frames_| + // consumes the entire buffer. return false; } |