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

Unified Diff: media/filters/ffmpeg_video_decoder.cc

Issue 2841813002: Converting video color space enums to their corresponding gfx:color space eqvivalent. (Closed)
Patch Set: Fixed ==> "warning C4701: potentially uninitialized local variable 'primary_id' used" Created 3 years, 7 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/base/video_color_space_unittest.cc ('k') | ui/gfx/color_space.h » ('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 1ed42bb9fb7c5ed0cd39c6ffc88cf9c492c6d959..094720566e1eaa7cb03ff02a8784fec0c325231d 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -187,12 +187,13 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context,
if (codec_context->color_primaries != AVCOL_PRI_UNSPECIFIED ||
codec_context->color_trc != AVCOL_TRC_UNSPECIFIED ||
codec_context->colorspace != AVCOL_SPC_UNSPECIFIED) {
- video_frame->set_color_space(gfx::ColorSpace::CreateVideo(
+ media::VideoColorSpace video_color_space = media::VideoColorSpace(
codec_context->color_primaries, codec_context->color_trc,
codec_context->colorspace,
codec_context->color_range != AVCOL_RANGE_MPEG
? gfx::ColorSpace::RangeID::FULL
- : gfx::ColorSpace::RangeID::LIMITED));
+ : gfx::ColorSpace::RangeID::LIMITED);
+ video_frame->set_color_space(video_color_space.ToGfxColorSpace());
}
for (size_t i = 0; i < VideoFrame::NumPlanes(video_frame->format()); i++) {
« no previous file with comments | « media/base/video_color_space_unittest.cc ('k') | ui/gfx/color_space.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698