| Index: media/formats/webm/webm_video_client.cc
|
| diff --git a/media/formats/webm/webm_video_client.cc b/media/formats/webm/webm_video_client.cc
|
| index 73bd095b854b73afd57276d232e7032cd3c4b543..e67c33ee4f838390320effe64fdbfaa79c24e7e9 100644
|
| --- a/media/formats/webm/webm_video_client.cc
|
| +++ b/media/formats/webm/webm_video_client.cc
|
| @@ -28,6 +28,7 @@ void WebMVideoClient::Reset() {
|
| display_height_ = -1;
|
| display_unit_ = -1;
|
| alpha_mode_ = -1;
|
| + colour_parsed_ = false;
|
| }
|
|
|
| bool WebMVideoClient::InitializeConfig(
|
| @@ -96,9 +97,26 @@ bool WebMVideoClient::InitializeConfig(
|
| config->Initialize(video_codec, profile, format, COLOR_SPACE_HD_REC709,
|
| coded_size, visible_rect, natural_size, codec_private,
|
| encryption_scheme);
|
| + if (colour_parsed_)
|
| + config->SetColorMetadata(colour_parser_.GetColorMetadata());
|
| return config->IsValidConfig();
|
| }
|
|
|
| +WebMParserClient* WebMVideoClient::OnListStart(int id) {
|
| + if (id == kWebMIdColour) {
|
| + colour_parsed_ = false;
|
| + return &colour_parser_;
|
| + }
|
| +
|
| + return this;
|
| +}
|
| +
|
| +bool WebMVideoClient::OnListEnd(int id) {
|
| + if (id == kWebMIdColour)
|
| + colour_parsed_ = true;
|
| + return true;
|
| +}
|
| +
|
| bool WebMVideoClient::OnUInt(int id, int64_t val) {
|
| int64_t* dst = NULL;
|
|
|
|
|