Index: media/ffmpeg/ffmpeg_common.cc |
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc |
index b5e4100b3fb5385d3180914021d2f9c91b82ab20..5a0afc86bd303f513952c9781053842d153247d0 100644 |
--- a/media/ffmpeg/ffmpeg_common.cc |
+++ b/media/ffmpeg/ffmpeg_common.cc |
@@ -387,6 +387,12 @@ void AVStreamToVideoDecoderConfig( |
coded_size = natural_size; |
} |
+ AVDictionaryEntry *webm_alpha = |
fgalligan1
2013/02/12 01:20:58
nit: Asterisk adjacent to the type per style in th
vigneshv
2013/02/14 19:06:14
Done.
|
+ av_dict_get(stream->metadata, "alpha_mode", NULL, 0); |
fgalligan1
2013/02/12 01:20:58
4 space indent
http://google-styleguide.googlecode
vigneshv
2013/02/14 19:06:14
Done.
|
+ if (webm_alpha && !strcmp(webm_alpha->value, "1")) { |
+ format = VideoFrame::YV12A; |
+ } |
+ |
config->Initialize(codec, |
profile, |
format, |
@@ -499,6 +505,8 @@ VideoFrame::Format PixelFormatToVideoFormat(PixelFormat pixel_format) { |
case PIX_FMT_YUV420P: |
case PIX_FMT_YUVJ420P: |
return VideoFrame::YV12; |
+ case PIX_FMT_YUVA420P: |
+ return VideoFrame::YV12A; |
default: |
DVLOG(1) << "Unsupported PixelFormat: " << pixel_format; |
} |
@@ -511,6 +519,8 @@ PixelFormat VideoFormatToPixelFormat(VideoFrame::Format video_format) { |
return PIX_FMT_YUV422P; |
case VideoFrame::YV12: |
return PIX_FMT_YUV420P; |
+ case VideoFrame::YV12A: |
+ return PIX_FMT_YUVA420P; |
default: |
DVLOG(1) << "Unsupported VideoFrame::Format: " << video_format; |
} |