mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
Use g_memdup2() where available and add fallback for older GLib versions
Alloc size is based on existing allocations and struct sizes. g_memdup() is deprecated since GLib 2.68 and we want to avoid deprecation warnings with recent versions of GLib. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/431>
This commit is contained in:
parent
f3dcdfbd60
commit
2614333389
2 changed files with 5 additions and 1 deletions
|
@ -671,7 +671,7 @@ op_data_ensure_caps (GstVaapiFilterOpData * op_data, gpointer filter_caps,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
op_data->va_caps = g_memdup (filter_cap, op_data->va_cap_size * va_num_caps);
|
||||
op_data->va_caps = g_memdup2 (filter_cap, op_data->va_cap_size * va_num_caps);
|
||||
if (!op_data->va_caps)
|
||||
return FALSE;
|
||||
|
||||
|
|
|
@ -208,6 +208,10 @@ if gst_version_nano == 0
|
|||
endif
|
||||
endif
|
||||
|
||||
if gmodule_dep.version().version_compare('< 2.67.4')
|
||||
cdata.set('g_memdup2(ptr,sz)', '(G_LIKELY(((guint64)(sz)) < G_MAXUINT)) ? g_memdup(ptr,sz) : (g_abort(),NULL)')
|
||||
endif
|
||||
|
||||
configure_file(output: 'config.h', configuration: cdata)
|
||||
|
||||
python3 = import('python').find_installation()
|
||||
|
|
Loading…
Reference in a new issue