From fe6775a50978204db1f558f40a7add5f42aea3a6 Mon Sep 17 00:00:00 2001 From: Jacob Trimble Date: Fri, 1 Apr 2016 16:16:51 -0700 Subject: [PATCH] Fixed off-by-one bug in WebM muxer There was a bug in the single-segment WebM muxer where the index range was incorrect. Closes #99 Change-Id: I7cde98f9b5e88615fcf0ab406b22f65f0b14e15f --- packager/app/test/testdata/bear-320x240-vorbis-webm-golden.mpd | 2 +- packager/app/test/testdata/bear-320x240-vp9-webm-golden.mpd | 2 +- .../app/test/testdata/bear-640x360-vp8-cenc-webm-golden.mpd | 2 +- packager/app/test/testdata/bear-640x360-vp8-webm-golden.mpd | 2 +- packager/media/formats/webm/single_segment_segmenter.cc | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packager/app/test/testdata/bear-320x240-vorbis-webm-golden.mpd b/packager/app/test/testdata/bear-320x240-vorbis-webm-golden.mpd index 0cbd5ff024..355f828201 100644 --- a/packager/app/test/testdata/bear-320x240-vorbis-webm-golden.mpd +++ b/packager/app/test/testdata/bear-320x240-vorbis-webm-golden.mpd @@ -6,7 +6,7 @@ output_audio.webm - + diff --git a/packager/app/test/testdata/bear-320x240-vp9-webm-golden.mpd b/packager/app/test/testdata/bear-320x240-vp9-webm-golden.mpd index 59314d26fc..5fdc5afcb2 100644 --- a/packager/app/test/testdata/bear-320x240-vp9-webm-golden.mpd +++ b/packager/app/test/testdata/bear-320x240-vp9-webm-golden.mpd @@ -5,7 +5,7 @@ output_video.webm - + diff --git a/packager/app/test/testdata/bear-640x360-vp8-cenc-webm-golden.mpd b/packager/app/test/testdata/bear-640x360-vp8-cenc-webm-golden.mpd index 0d4fd16daf..236818df44 100644 --- a/packager/app/test/testdata/bear-640x360-vp8-cenc-webm-golden.mpd +++ b/packager/app/test/testdata/bear-640x360-vp8-cenc-webm-golden.mpd @@ -8,7 +8,7 @@ AAAAMHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABAxMjM0NTY3ODkwMTIzNDU2 output_video.webm - + diff --git a/packager/app/test/testdata/bear-640x360-vp8-webm-golden.mpd b/packager/app/test/testdata/bear-640x360-vp8-webm-golden.mpd index a4951cb6ea..205829a645 100644 --- a/packager/app/test/testdata/bear-640x360-vp8-webm-golden.mpd +++ b/packager/app/test/testdata/bear-640x360-vp8-webm-golden.mpd @@ -5,7 +5,7 @@ output_video.webm - + diff --git a/packager/media/formats/webm/single_segment_segmenter.cc b/packager/media/formats/webm/single_segment_segmenter.cc index b8920b603b..5a8d64603f 100644 --- a/packager/media/formats/webm/single_segment_segmenter.cc +++ b/packager/media/formats/webm/single_segment_segmenter.cc @@ -80,7 +80,7 @@ bool SingleSegmentSegmenter::GetIndexRangeStartAndEnd(uint32_t* start, // The index is the Cues element, which is always placed at the end of the // file. *start = index_start_; - *end = writer_->file()->Size(); + *end = writer_->file()->Size() - 1; return true; }