Index: content/browser/renderer_host/media/video_capture_controller.cc |
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc |
index 85f0a2948c7586ce94c82b43916f65668e3426d9..324596788ed78044967a2bcffb1a0e61ae909468 100644 |
--- a/content/browser/renderer_host/media/video_capture_controller.cc |
+++ b/content/browser/renderer_host/media/video_capture_controller.cc |
@@ -218,7 +218,8 @@ void VideoCaptureController::AddClient( |
// Check that requested VideoCaptureParams are valid and supported. If not, |
// report an error immediately and punt. |
if (!params.IsValid() || |
- params.requested_format.pixel_format != media::PIXEL_FORMAT_I420 || |
+ !(params.requested_format.pixel_format == media::PIXEL_FORMAT_I420 || |
+ params.requested_format.pixel_format == media::PIXEL_FORMAT_Y16) || |
params.requested_format.pixel_storage != media::PIXEL_STORAGE_CPU) { |
// Crash in debug builds since the renderer should not have asked for |
// invalid or unsupported parameters. |
@@ -421,8 +422,9 @@ void VideoCaptureController::OnIncomingCapturedVideoFrame( |
new base::DictionaryValue()); |
frame->metadata()->MergeInternalValuesInto(metadata.get()); |
- // Only I420 pixel format is currently supported. |
- DCHECK_EQ(frame->format(), media::PIXEL_FORMAT_I420) |
+ // Only I420 and Y16 pixel formats are currently supported. |
+ DCHECK(frame->format() == media::PIXEL_FORMAT_I420 || |
+ frame->format() == media::PIXEL_FORMAT_Y16) |
<< "Unsupported pixel format: " |
<< media::VideoPixelFormatToString(frame->format()); |