| Index: media/filters/ffmpeg_video_decoder.cc
|
| diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
|
| index 93dcee2157a4bfc12f25759eb55dc6abc4431607..7a8c80f2df965be2b1f0e654aa56c655efd441c4 100644
|
| --- a/media/filters/ffmpeg_video_decoder.cc
|
| +++ b/media/filters/ffmpeg_video_decoder.cc
|
| @@ -86,10 +86,16 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context,
|
| // updated width/height/pix_fmt, which can change for adaptive
|
| // content.
|
| VideoFrame::Format format = PixelFormatToVideoFormat(codec_context->pix_fmt);
|
| + if (format == VideoFrame::YV12 &&
|
| + codec_context->colorspace == AVCOL_SPC_BT709) {
|
| + format = VideoFrame::YV12HD;
|
| + }
|
| +
|
| if (format == VideoFrame::UNKNOWN)
|
| return AVERROR(EINVAL);
|
| DCHECK(format == VideoFrame::YV12 || format == VideoFrame::YV16 ||
|
| - format == VideoFrame::YV12J || format == VideoFrame::YV24);
|
| + format == VideoFrame::YV12J || format == VideoFrame::YV24 ||
|
| + format == VideoFrame::YV12HD);
|
|
|
| gfx::Size size(codec_context->width, codec_context->height);
|
| const int ret = av_image_check_size(size.width(), size.height(), 0, NULL);
|
|
|