Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1308)

Unified Diff: media/gpu/dxva_video_decode_accelerator_win.cc

Issue 2708353004: Propagate color space from the container to the codec. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/h264_parser.cc ('k') | media/gpu/ipc/common/media_param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/dxva_video_decode_accelerator_win.cc
diff --git a/media/gpu/dxva_video_decode_accelerator_win.cc b/media/gpu/dxva_video_decode_accelerator_win.cc
index a3ebb2d14593aeff7f5d82a6133ac04c39d8664f..7d0963b156989c26c0f6add5ccbdda86d0d78e46 100644
--- a/media/gpu/dxva_video_decode_accelerator_win.cc
+++ b/media/gpu/dxva_video_decode_accelerator_win.cc
@@ -2130,7 +2130,10 @@ void DXVAVideoDecodeAccelerator::FlushInternal() {
// Attempt to retrieve an output frame from the decoder. If we have one,
// return and proceed when the output frame is processed. If we don't have a
// frame then we are done.
- DoDecode(config_change_detector_->current_color_space());
+ gfx::ColorSpace color_space = config_change_detector_->current_color_space();
+ if (!color_space.IsValid())
+ color_space = config_.color_space;
+ DoDecode(color_space);
if (OutputSamplesPresent())
return;
@@ -2180,6 +2183,8 @@ void DXVAVideoDecodeAccelerator::DecodeInternal(
}
gfx::ColorSpace color_space = config_change_detector_->current_color_space();
+ if (!color_space.IsValid())
+ color_space = config_.color_space;
if (!inputs_before_decode_) {
TRACE_EVENT_ASYNC_BEGIN0("gpu", "DXVAVideoDecodeAccelerator.Decoding",
« no previous file with comments | « media/filters/h264_parser.cc ('k') | media/gpu/ipc/common/media_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698