summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHyunjun Ko <zzoon@igalia.com>2017-06-29 12:50:26 +0900
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-07-04 13:27:56 +0200
commit9b73b31c7a0bd99792e59438f962c5100358e311 (patch)
treed6ebfbca3846c6366493cdbc042567f5652b26c4 /gst-libs
parent5b38e7fbe2165276af3aabe126e9747cf850a599 (diff)
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
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
index b93bafea..fda0c31e 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
@@ -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);