mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
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>
This commit is contained in:
parent
a707d984ae
commit
c2144ec586
1 changed files with 1 additions and 0 deletions
|
@ -1460,6 +1460,7 @@ gst_v4l2_codec_h264_dec_subinit (GstV4l2CodecH264Dec * self,
|
|||
gst_video_info_init (&self->vinfo);
|
||||
self->slice_params = g_array_sized_new (FALSE, TRUE,
|
||||
sizeof (struct v4l2_ctrl_h264_slice_params), 4);
|
||||
g_array_set_size (self->slice_params, 4);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue