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

Unified Diff: media/filters/ffmpeg_video_decoder.cc

Issue 1228843003: Revert of Change the video color space default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/decrypting_demuxer_stream.cc ('k') | media/filters/ffmpeg_video_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_video_decoder.cc
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index 2c604f8226b9570428e950a8d9643de18f78ed96..fdf8dc5841a8085c4831026dd693b6fe3e994acf 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -127,15 +127,10 @@
scoped_refptr<VideoFrame> video_frame = frame_pool_.CreateFrame(
format, coded_size, gfx::Rect(size), natural_size, kNoTimestamp());
-
- // Prefer the color space from the codec context. If it's not specified (or is
- // set to an unsupported value), fall back on the value from the config.
- VideoFrame::ColorSpace color_space =
- AVColorSpaceToVideoFrameColorSpace(codec_context->colorspace);
- if (color_space == VideoFrame::COLOR_SPACE_UNSPECIFIED)
- color_space = config_.color_space();
- video_frame->metadata()->SetInteger(VideoFrameMetadata::COLOR_SPACE,
- color_space);
+ if (codec_context->colorspace == AVCOL_SPC_BT709) {
+ video_frame->metadata()->SetInteger(VideoFrameMetadata::COLOR_SPACE,
+ VideoFrame::COLOR_SPACE_HD_REC709);
+ }
for (int i = 0; i < 3; i++) {
frame->data[i] = video_frame->data(i);
« no previous file with comments | « media/filters/decrypting_demuxer_stream.cc ('k') | media/filters/ffmpeg_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698