Commit 254b9adf authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/vaapi/vaapiWrapper: Fix kVaapiFunctionNames initialization

The commas are forgot in the kVaapiFunctionNames initialization.
Thus it initializes the first element and the second or later
element is nullptr. SIGSEGV is caused in attempting to log the
name because the char's pointer is nullptr.

Bug: b:162962069
Test: video_encode_accelerator_tests on atlas
Change-Id: Ifbb081b8e92350df5b83510087a042b7213bc377
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2362378
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarAndres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799477}
parent be6e4199
...@@ -122,34 +122,33 @@ void ReportVaapiErrorToUMA(const std::string& histogram_name, ...@@ -122,34 +122,33 @@ void ReportVaapiErrorToUMA(const std::string& histogram_name,
} }
constexpr std::array<const char*, constexpr std::array<const char*,
static_cast<size_t>(VaapiFunctions::kMaxValue)> static_cast<size_t>(VaapiFunctions::kMaxValue) + 1>
kVaapiFunctionNames = { kVaapiFunctionNames = {"vaBeginPicture",
"vaBeginPicture" "vaCreateBuffer",
"vaCreateBuffer" "vaCreateConfig",
"vaCreateConfig" "vaCreateContext",
"vaCreateContext" "vaCreateImage",
"vaCreateImage" "vaCreateSurfaces (allocate mode)",
"vaCreateSurfaces (allocate mode)" "vaCreateSurfaces (import mode)",
"vaCreateSurfaces (import mode)" "vaDestroyBuffer",
"vaDestroyBuffer" "vaDestroyConfig",
"vaDestroyConfig" "vaDestroyContext",
"vaDestroyContext" "vaDestroySurfaces",
"vaDestroySurfaces" "vaEndPicture",
"vaEndPicture" "vaExportSurfaceHandle",
"vaExportSurfaceHandle" "vaGetConfigAttributes",
"vaGetConfigAttributes" "vaPutImage",
"vaPutImage" "vaPutSurface",
"vaPutSurface" "vaQueryConfigAttributes",
"vaQueryConfigAttributes" "vaQueryImageFormats",
"vaQueryImageFormats" "vaQuerySurfaceAttributes",
"vaQuerySurfaceAttributes" "vaQueryVideoProcPipelineCaps",
"vaQueryVideoProcPipelineCaps" "vaRenderPicture (|pending_va_buffers_|)",
"vaRenderPicture (|pending_va_buffers_|)" "vaRenderPicture using Vpp",
"vaRenderPicture using Vpp" "vaSyncSurface",
"vaSyncSurface" "vaTerminate",
"vaTerminate" "vaUnmapBuffer",
"vaUnmapBuffer" "Other VA function"};
"Other VA function"};
// Translates |function| into a human readable string for logging. // Translates |function| into a human readable string for logging.
const char* VaapiFunctionName(VaapiFunctions function) { const char* VaapiFunctionName(VaapiFunctions function) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment