fftools/ffplay: Check vulkan_params

Fixes: CID1550133 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-04-28 01:15:16 +02:00
parent ed364444f1
commit 4bca147415
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 7 additions and 2 deletions

View File

@ -3836,8 +3836,13 @@ int main(int argc, char **argv)
if (vk_renderer) {
AVDictionary *dict = NULL;
if (vulkan_params)
av_dict_parse_string(&dict, vulkan_params, "=", ":", 0);
if (vulkan_params) {
int ret = av_dict_parse_string(&dict, vulkan_params, "=", ":", 0);
if (ret < 0) {
av_log(NULL, AV_LOG_FATAL, "Failed to parse, %s\n", vulkan_params);
do_exit(NULL);
}
}
ret = vk_renderer_create(vk_renderer, window, dict);
av_dict_free(&dict);
if (ret < 0) {