gst-libav: tests: fix build with older glib versions

g_newa0() is only available since 2.72.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8333>
This commit is contained in:
Tim-Philipp Müller 2025-01-21 00:43:01 +00:00
parent 86bac82c8e
commit 4bd7e194f6

View file

@ -174,7 +174,7 @@ GST_START_TEST (test_audioenc_alignment_fixup)
const gsize size = N_SAMPLES * sizeof (float);
float *samples = g_newa0 (float, (N_SAMPLES + N_ALIGNMENTS));
float *samples = g_new0 (float, (N_SAMPLES + N_ALIGNMENTS));
guint64 offset = 0;
@ -193,6 +193,8 @@ GST_START_TEST (test_audioenc_alignment_fixup)
offset += N_SAMPLES;
}
g_free (samples);
gst_harness_teardown (h);
}