From a258e203e6c0a4ba27a3e9dbbe807e8a7afffc75 Mon Sep 17 00:00:00 2001 From: kcwu Date: Fri, 6 Nov 2015 03:38:18 -0800 Subject: Fix crash due to bad UMA bucket range in vaapi accelerators BUG=chromium:549054 TEST=manually generate an error and see UMA doesn't crash Review URL: https://codereview.chromium.org/1434533003 Cr-Commit-Position: refs/heads/master@{#358306} --- content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc | 3 ++- content/common/gpu/media/vaapi_video_decode_accelerator.cc | 3 ++- content/common/gpu/media/vaapi_video_encode_accelerator.cc | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'content') diff --git a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc index 9a5f394e..11ff91a 100644 --- a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc +++ b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc @@ -21,7 +21,8 @@ namespace { // UMA errors that the VaapiJpegDecodeAccelerator class reports. enum VAJDADecoderFailure { VAAPI_ERROR = 0, - VAJDA_DECODER_FAILURES_MAX, + // UMA requires that max must be greater than 1. + VAJDA_DECODER_FAILURES_MAX = 2, }; static void ReportToUMA(VAJDADecoderFailure failure) { diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc index d5b70aa..704f7f2 100644 --- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc +++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc @@ -29,7 +29,8 @@ namespace { // UMA errors that the VaapiVideoDecodeAccelerator class reports. enum VAVDADecoderFailure { VAAPI_ERROR = 0, - VAVDA_DECODER_FAILURES_MAX, + // UMA requires that max must be greater than 1. + VAVDA_DECODER_FAILURES_MAX = 2, }; } diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.cc b/content/common/gpu/media/vaapi_video_encode_accelerator.cc index 1f9388e..9c078b2 100644 --- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc +++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc @@ -67,7 +67,8 @@ const int kCPBWindowSizeMs = 1500; // UMA errors that the VaapiVideoEncodeAccelerator class reports. enum VAVEAEncoderFailure { VAAPI_ERROR = 0, - VAVEA_ENCODER_FAILURES_MAX, + // UMA requires that max must be greater than 1. + VAVEA_ENCODER_FAILURES_MAX = 2, }; } -- cgit v1.1