| Index: media/ffmpeg/ffmpeg_common.cc
|
| diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
|
| index 950b9c0fd103672103d65048a7ad47ab48b89ee7..a241e0491bffc8f5b8ee35073dca92e858d55916 100644
|
| --- a/media/ffmpeg/ffmpeg_common.cc
|
| +++ b/media/ffmpeg/ffmpeg_common.cc
|
| @@ -506,10 +506,13 @@ bool AVStreamToVideoDecoderConfig(const AVStream* stream,
|
| coded_size.set_height((coded_size.height() + 1) / 2 * 2);
|
| }
|
|
|
| - AVDictionaryEntry* webm_alpha =
|
| - av_dict_get(stream->metadata, "alpha_mode", nullptr, 0);
|
| - if (webm_alpha && !strcmp(webm_alpha->value, "1")) {
|
| - format = PIXEL_FORMAT_YV12A;
|
| + // H264 doesn't support alpha mode.
|
| + if (codec != kCodecH264) {
|
| + AVDictionaryEntry* webm_alpha =
|
| + av_dict_get(stream->metadata, "alpha_mode", nullptr, 0);
|
| + if (webm_alpha && !strcmp(webm_alpha->value, "1")) {
|
| + format = PIXEL_FORMAT_YV12A;
|
| + }
|
| }
|
|
|
| // Prefer the color space found by libavcodec if available.
|
|
|