summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorkcwu <kcwu@google.com>2015-11-06 03:38:18 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-06 11:39:13 +0000
commita258e203e6c0a4ba27a3e9dbbe807e8a7afffc75 (patch)
tree9b6912fd51bfb814235f7c62ca722d1a7ecffdc1 /content
parent85f856f32624c9d3e28f40b84aaa005a8db275fa (diff)
downloadchromium_src-a258e203e6c0a4ba27a3e9dbbe807e8a7afffc75.zip
chromium_src-a258e203e6c0a4ba27a3e9dbbe807e8a7afffc75.tar.gz
chromium_src-a258e203e6c0a4ba27a3e9dbbe807e8a7afffc75.tar.bz2
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}
Diffstat (limited to 'content')
-rw-r--r--content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc3
-rw-r--r--content/common/gpu/media/vaapi_video_decode_accelerator.cc3
-rw-r--r--content/common/gpu/media/vaapi_video_encode_accelerator.cc3
3 files changed, 6 insertions, 3 deletions
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,
};
}