Skip to content

Commit

Permalink
Hack to add fake range to fill start hole
Browse files Browse the repository at this point in the history
  • Loading branch information
eocanha committed Feb 19, 2015
1 parent f5056c1 commit 5280e4f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/WebCore/Modules/mediasource/SourceBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,14 @@ void SourceBuffer::sourceBufferPrivateDidReceiveSample(SourceBufferPrivate*, Pas
// the coded frame's presentation timestamp in seconds.
MediaTime presentationTimestamp = sample->presentationTime();

// METRO FIXME: Hack to add fake range to fill start hole
if (m_buffered && m_buffered->length() == 0 &&
presentationTimestamp >= MediaTime::zeroTime() &&
presentationTimestamp <= MediaTime::createWithDouble(0.1)) {
LOG(MediaSource, "SourceBuffer::sourceBufferPrivateDidReceiveSample(%p) - Adding a fake range to fill start hole", this);
m_buffered->add(0.0, presentationTimestamp.toDouble());
}

// 1.2 Let decode timestamp be a double precision floating point representation of the coded frame's
// decode timestamp in seconds.
MediaTime decodeTimestamp = sample->decodeTime();
Expand Down

0 comments on commit 5280e4f

Please sign in to comment.