v4l2codecs: h264: Fix initialization of the slice array
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 12 Jul 2022 19:44:45 +0000 (15:44 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 22 Jul 2022 14:21:03 +0000 (10:21 -0400)
commitc2144ec58693a2573e6836a44ef5620a16540189
treec00895949e4f21c374d40fb7da70d2f25352521c
parenta707d984ae9cc351e99c6ce953872c218752b481
v4l2codecs: h264: Fix initialization of the slice array

The function g_array_sized_new() leaves the len to 0, but the slice
implementation assumes it would be set to 4. Sending multiple slices is
not yet support for H.264 as no driver needed it yet, but if that code
was to be used it would have overflowed as the array would never grow as
multiple 0 by 2 always results in 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech264dec.c