diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-17 03:00:07 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-17 03:00:07 +0000 |
commit | b6af1a2209cca61eb19ce4ece6ca22687eb3ed7e (patch) | |
tree | 1ae9d6b1218df7d2ae6df18100736fdfcca2b1e1 /media/formats/webm/cluster_builder.cc | |
parent | 0bb3a621c3e090c9d2bb6c5dc1c0033611924cfb (diff) | |
download | chromium_src-b6af1a2209cca61eb19ce4ece6ca22687eb3ed7e.zip chromium_src-b6af1a2209cca61eb19ce4ece6ca22687eb3ed7e.tar.gz chromium_src-b6af1a2209cca61eb19ce4ece6ca22687eb3ed7e.tar.bz2 |
Fix WebMStreamParser to continue parsing after a cluster end
Previously the parser would stop after cluster end even if there is more
data to be parsed.
BUG=382807,335676
R=acolwell@chromium.org, wolenetz@chromium.org
Review URL: https://codereview.chromium.org/328653002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277633 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/formats/webm/cluster_builder.cc')
-rw-r--r-- | media/formats/webm/cluster_builder.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/media/formats/webm/cluster_builder.cc b/media/formats/webm/cluster_builder.cc index bada9e2..1a3b358 100644 --- a/media/formats/webm/cluster_builder.cc +++ b/media/formats/webm/cluster_builder.cc @@ -6,6 +6,7 @@ #include "base/logging.h" #include "media/base/data_buffer.h" +#include "media/formats/webm/webm_constants.h" namespace media { @@ -180,6 +181,16 @@ scoped_ptr<Cluster> ClusterBuilder::Finish() { return ret.Pass(); } +scoped_ptr<Cluster> ClusterBuilder::FinishWithUnknownSize() { + DCHECK_NE(cluster_timecode_, -1); + + UpdateUInt64(kClusterSizeOffset, kWebMUnknownSize); + + scoped_ptr<Cluster> ret(new Cluster(buffer_.Pass(), bytes_used_)); + Reset(); + return ret.Pass(); +} + void ClusterBuilder::Reset() { buffer_size_ = kInitialBufferSize; buffer_.reset(new uint8[buffer_size_]); |