diff --git a/src/modules/gpu/gpu.c b/src/modules/gpu/gpu.c index 64fb14380..723a2cebe 100644 --- a/src/modules/gpu/gpu.c +++ b/src/modules/gpu/gpu.c @@ -386,9 +386,12 @@ bool ffGenerateGPUJsonResult(FFGPUOptions* options, yyjson_mut_doc* doc, yyjson_ { case FF_GPU_TYPE_INTEGRATED: type = "Integrated"; break; case FF_GPU_TYPE_DISCRETE: type = "Discrete"; break; - default: type = "Unknown"; break; + default: type = NULL; break; } - yyjson_mut_obj_add_str(doc, obj, "type", type); + if (type) + yyjson_mut_obj_add_str(doc, obj, "type", type); + else + yyjson_mut_obj_add_null(doc, obj, "type"); yyjson_mut_obj_add_strbuf(doc, obj, "vendor", &gpu->vendor);