Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(943)

Unified Diff: media/base/video_codecs.cc

Issue 2864593003: Add MimeUtil::Parse{Audio|Video}CodecString (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/video_codecs.cc
diff --git a/media/base/video_codecs.cc b/media/base/video_codecs.cc
index 4d1cdc45840e7a0fc137dd9b9a1607e8d7408a2c..6edf1633c51a7b1333c461bcda7015751aedcb82 100644
--- a/media/base/video_codecs.cc
+++ b/media/base/video_codecs.cc
@@ -237,9 +237,10 @@ bool ParseLegacyVp9CodecID(const std::string& codec_id,
VideoCodecProfile* profile,
uint8_t* level_idc) {
if (codec_id == "vp9" || codec_id == "vp9.0") {
- // Profile is not included in the codec string. Assuming profile 0 to be
- // backward compatible.
- *profile = VP9PROFILE_PROFILE0;
+ // Profile is not included in the codec string. Consumers of parsed codec
+ // should handle by rejecting ambiguous string or resolving to a default
+ // profile.
+ *profile = VIDEO_CODEC_PROFILE_UNKNOWN;
// Use 0 to indicate unknown level.
*level_idc = 0;
return true;

Powered by Google App Engine
This is Rietveld 408576698