| Index: media/ffmpeg/ffmpeg_common.cc
|
| diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
|
| index b5e4100b3fb5385d3180914021d2f9c91b82ab20..808f91ab0ddc2c9b81edc841ef9258c33b60ff9b 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 =
|
| + av_dict_get(stream->metadata, "alpha_mode", NULL, 0);
|
| + 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;
|
| }
|
|
|