vaapi: libs: Use unsized arrays as parameters.

Instead of defining a sized array for function signature, use it
unsized (a pointer alias, basically). In this way clang warning is
silenced:

warning: ‘fill_profiles’ accessing 64 bytes in a region of size 12 [-Wstringop-overflow=]

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1357>
This commit is contained in:
Víctor Manuel Jáquez Leal 2021-11-16 17:18:28 +01:00 committed by GStreamer Marge Bot
parent 2d5a10f6a6
commit 92f8b54657
2 changed files with 3 additions and 3 deletions

View file

@ -1435,7 +1435,7 @@ get_sps (GstVaapiDecoderH264 * decoder)
} }
static void static void
fill_profiles (GstVaapiProfile profiles[16], guint * n_profiles_ptr, fill_profiles (GstVaapiProfile profiles[], guint * n_profiles_ptr,
GstVaapiProfile profile) GstVaapiProfile profile)
{ {
guint n_profiles = *n_profiles_ptr; guint n_profiles = *n_profiles_ptr;
@ -1453,7 +1453,7 @@ fill_profiles (GstVaapiProfile profiles[16], guint * n_profiles_ptr,
/* Fills in compatible profiles for MVC decoding */ /* Fills in compatible profiles for MVC decoding */
static void static void
fill_profiles_mvc (GstVaapiDecoderH264 * decoder, GstVaapiProfile profiles[16], fill_profiles_mvc (GstVaapiDecoderH264 * decoder, GstVaapiProfile profiles[],
guint * n_profiles_ptr, guint dpb_size) guint * n_profiles_ptr, guint dpb_size)
{ {
const gchar *const vendor_string = const gchar *const vendor_string =

View file

@ -1073,7 +1073,7 @@ gst_vaapi_decoder_h265_reset (GstVaapiDecoder * base_decoder)
} }
static void static void
fill_profiles (GstVaapiProfile profiles[16], guint * n_profiles_ptr, fill_profiles (GstVaapiProfile profiles[], guint * n_profiles_ptr,
GstVaapiProfile profile) GstVaapiProfile profile)
{ {
guint n_profiles = *n_profiles_ptr; guint n_profiles = *n_profiles_ptr;