summaryrefslogtreecommitdiffstats
path: root/content/renderer/media
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 03:48:12 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 03:48:12 +0000
commit90e0914bbde0c3ffb6846ca32c7e917db4ca24ab (patch)
tree2f8abbf908a86a6958f4c1e68c22112cbd5b7817 /content/renderer/media
parent2f68b644d68a46c3cb1bcfe66bac96521d1b8ba4 (diff)
downloadchromium_src-90e0914bbde0c3ffb6846ca32c7e917db4ca24ab.zip
chromium_src-90e0914bbde0c3ffb6846ca32c7e917db4ca24ab.tar.gz
chromium_src-90e0914bbde0c3ffb6846ca32c7e917db4ca24ab.tar.bz2
KeySystems: IsSupportedContainerAndCodecs() ignores empty codec.
In IsTypeSupported() call, when the codec string in the mime type contains extra commas, e.g. ",vorbis", an empty codec will be passed into IsSupportedContainerAndCodecs. In this case, we should ignore that codec instead of assuming it's not empty. BUG=362769 TEST=Layout test crash is fixed. R=ddorwin@chromium.org Review URL: https://codereview.chromium.org/254913002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/media')
-rw-r--r--content/renderer/media/crypto/key_systems.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/content/renderer/media/crypto/key_systems.cc b/content/renderer/media/crypto/key_systems.cc
index 75a13a6..724b829 100644
--- a/content/renderer/media/crypto/key_systems.cc
+++ b/content/renderer/media/crypto/key_systems.cc
@@ -281,7 +281,8 @@ bool KeySystems::IsSupportedContainerAndCodecs(
for (size_t i = 0; i < codecs.size(); ++i) {
const std::string& codec = codecs[i];
- DCHECK(!codec.empty());
+ if (codec.empty())
+ continue;
CodecMaskMap::const_iterator codec_iter = codec_masks_.find(codec);
if (codec_iter == codec_masks_.end()) // Unrecognized codec.
return false;