mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +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))
|
if (i == G_N_ELEMENTS (video_codecs_map))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
chroma_sub = gst_structure_get_string (structure, "chroma-format");
|
||||||
if (!gst_structure_get (structure, "chroma-format", G_TYPE_STRING,
|
if (!chroma_sub)
|
||||||
&chroma_sub, "bit-depth-luma", G_TYPE_UINT, &luma, "bit-depth-chroma",
|
return FALSE;
|
||||||
G_TYPE_UINT, &chroma, NULL))
|
if (!gst_structure_get (structure, "bit-depth-luma", G_TYPE_UINT, &luma,
|
||||||
|
"bit-depth-chroma", G_TYPE_UINT, &chroma, NULL))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (video_chroma_map); i++) {
|
for (i = 0; i < G_N_ELEMENTS (video_chroma_map); i++) {
|
||||||
|
|
Loading…
Reference in a new issue