Index: media/webm/webm_video_client.cc |
diff --git a/media/webm/webm_video_client.cc b/media/webm/webm_video_client.cc |
index b4e729e36eeab290126cd7bb80b694bc6340ecab..1d0cbcb2ac40d36baf4c55abf4cf3e05e877c411 100644 |
--- a/media/webm/webm_video_client.cc |
+++ b/media/webm/webm_video_client.cc |
@@ -27,6 +27,7 @@ void WebMVideoClient::Reset() { |
display_width_ = -1; |
display_height_ = -1; |
display_unit_ = -1; |
+ alpha_mode_ = -1; |
} |
bool WebMVideoClient::InitializeConfig( |
@@ -47,6 +48,9 @@ bool WebMVideoClient::InitializeConfig( |
return false; |
} |
+ VideoFrame::Format format = |
+ (alpha_mode_ == 1) ? VideoFrame::YV12A : VideoFrame::YV12; |
+ |
if (pixel_width_ <= 0 || pixel_height_ <= 0) |
return false; |
@@ -93,9 +97,8 @@ bool WebMVideoClient::InitializeConfig( |
} |
config->Initialize( |
- video_codec, profile, VideoFrame::YV12, coded_size, |
- visible_rect, natural_size, extra_data, extra_data_size, |
- is_encrypted, true); |
+ video_codec, profile, format, coded_size, visible_rect, natural_size, |
+ extra_data, extra_data_size, is_encrypted, true); |
return config->IsValidConfig(); |
} |
@@ -130,6 +133,9 @@ bool WebMVideoClient::OnUInt(int id, int64 val) { |
case kWebMIdDisplayUnit: |
dst = &display_unit_; |
break; |
+ case kWebMIdAlphaMode: |
+ dst = &alpha_mode_; |
+ break; |
default: |
return true; |
} |