Chromium Code Reviews| Index: media/filters/decrypting_video_decoder.cc |
| diff --git a/media/filters/decrypting_video_decoder.cc b/media/filters/decrypting_video_decoder.cc |
| index bb883bd59a4b297fccc7b73254bd72315b235085..554cd688ae3f6b3b2b8d515c6097ddf6fd5157f6 100644 |
| --- a/media/filters/decrypting_video_decoder.cc |
| +++ b/media/filters/decrypting_video_decoder.cc |
| @@ -275,8 +275,17 @@ void DecryptingVideoDecoder::DeliverFrame( |
| } |
| DCHECK_EQ(status, Decryptor::kSuccess); |
| - // No frame returned with kSuccess should be end-of-stream frame. |
| + // Frame returned with kSuccess should not be an end-of-stream frame. |
| DCHECK(!frame->metadata()->IsTrue(VideoFrameMetadata::END_OF_STREAM)); |
| + |
| + // If color space is not set, use the color space in the |config_|. |
| + if (frame->ColorSpace() == gfx::ColorSpace() && |
|
hubbe
2017/05/10 17:23:11
It's probably better to use frame->ColorSpace().Is
xhwang
2017/05/10 20:17:23
Done and improved this block.
|
| + config_.color_space_info() != VideoColorSpace()) { |
| + frame->metadata()->SetInteger(VideoFrameMetadata::COLOR_SPACE, |
| + config_.color_space()); |
| + frame->set_color_space(config_.color_space_info().ToGfxColorSpace()); |
| + } |
| + |
| output_cb_.Run(frame); |
| if (scoped_pending_buffer_to_decode->end_of_stream()) { |