Commit 50252de9 authored by mcasas's avatar mcasas Committed by Commit bot

WebmMuxer: do not set DefaultDuration if timestamp delta is not near constant

WebmMuxer sets WebM's DefaultDuration to the expected delta between
frames (derived from the frame rate), but that messes up (some) players
due to frames arriving at a different rate. This is a legimimate case
if, e.g.  the encoded data stream is paused.

This CL essentially avoids setting this parameter so that players
can just look at each encoded frame timestamp instead.

[1] http://www.webmproject.org/docs/container/#track

BUG=606000

Review-Url: https://codereview.chromium.org/2617143003
Cr-Commit-Position: refs/heads/master@{#442081}
parent 444e0bbe
...@@ -242,8 +242,6 @@ void WebmMuxer::AddVideoTrack(const gfx::Size& frame_size, double frame_rate) { ...@@ -242,8 +242,6 @@ void WebmMuxer::AddVideoTrack(const gfx::Size& frame_size, double frame_rate) {
DCHECK_EQ(0ull, video_track->crop_bottom()); DCHECK_EQ(0ull, video_track->crop_bottom());
DCHECK_EQ(0.0f, video_track->frame_rate()); DCHECK_EQ(0.0f, video_track->frame_rate());
video_track->set_default_duration(base::Time::kNanosecondsPerSecond /
frame_rate);
// Segment's timestamps should be in milliseconds, DCHECK it. See // Segment's timestamps should be in milliseconds, DCHECK it. See
// http://www.webmproject.org/docs/container/#muxer-guidelines // http://www.webmproject.org/docs/container/#muxer-guidelines
DCHECK_EQ(1000000ull, segment_.GetSegmentInfo()->timecode_scale()); DCHECK_EQ(1000000ull, segment_.GetSegmentInfo()->timecode_scale());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment