libs: encoder: h264: initialize all elements of view_ids

Currently when num_views is changed by multiview-mode on sink caps, it produces
wrong MVC encoded stream since the array view_ids is not set properly according
to changed num_views.

So this patch initializes all of the array sequentially to handle this case.
Side effect is not going to happen by this patch since this array is being
handled by num_views.

https://bugzilla.gnome.org/show_bug.cgi?id=784321
This commit is contained in:
Hyunjun Ko 2017-06-29 12:50:26 +09:00 committed by Víctor Manuel Jáquez Leal
parent 5b38e7fbe2
commit 9b73b31c7a

View file

@ -2971,7 +2971,7 @@ gst_vaapi_encoder_h264_set_property (GstVaapiEncoder * base_encoder,
GValueArray *view_ids = g_value_get_boxed (value);
if (view_ids == NULL) {
for (i = 0; i < encoder->num_views; i++)
for (i = 0; i < MAX_NUM_VIEWS; i++)
encoder->view_ids[i] = i;
} else {
g_assert (view_ids->n_values <= encoder->num_views);