mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 09:41:07 +00:00
vkvideoutils: fix memory leak in structure's string
Retrieve a const char* from structure for "chromat-format" and avoid extra mem copy. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4904>
This commit is contained in:
parent
981db9d1d3
commit
c98f5c2bf4
1 changed files with 5 additions and 4 deletions
|
@ -282,10 +282,11 @@ gst_vulkan_video_profile_from_caps (GstVulkanVideoProfile * profile,
|
|||
}
|
||||
if (i == G_N_ELEMENTS (video_codecs_map))
|
||||
return FALSE;
|
||||
|
||||
if (!gst_structure_get (structure, "chroma-format", G_TYPE_STRING,
|
||||
&chroma_sub, "bit-depth-luma", G_TYPE_UINT, &luma, "bit-depth-chroma",
|
||||
G_TYPE_UINT, &chroma, NULL))
|
||||
chroma_sub = gst_structure_get_string (structure, "chroma-format");
|
||||
if (!chroma_sub)
|
||||
return FALSE;
|
||||
if (!gst_structure_get (structure, "bit-depth-luma", G_TYPE_UINT, &luma,
|
||||
"bit-depth-chroma", G_TYPE_UINT, &chroma, NULL))
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (video_chroma_map); i++) {
|
||||
|
|
Loading…
Reference in a new issue