From: Fabrice Fontaine Date: Mon, 14 Dec 2020 06:42:55 +0000 (+0100) Subject: gst-libs/gst/video/gstvideoaggregator.c: fix build with gcc 4.8 X-Git-Tag: 1.19.3~511^2~323 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d86cf6314f8f178c59600f55321ce73d4ca95d97;p=platform%2Fupstream%2Fgstreamer.git gst-libs/gst/video/gstvideoaggregator.c: fix build with gcc 4.8 Fix the following build failure with gcc 4.8 which has been added with https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/d268c193ad39fb970351ed62898be806ebd0a71e: ../gst-libs/gst/video/gstvideoaggregator.c: In function 'gst_video_aggregator_init': ../gst-libs/gst/video/gstvideoaggregator.c:2762:3: error: 'for' loop initial declarations are only allowed in C99 mode for (gint i = 0; i < gst_caps_get_size (src_template); i++) { ^ Signed-off-by: Fabrice Fontaine Part-of: --- diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c index 2e3d813..04dad65 100644 --- a/gst-libs/gst/video/gstvideoaggregator.c +++ b/gst-libs/gst/video/gstvideoaggregator.c @@ -2786,6 +2786,7 @@ gst_video_aggregator_init (GstVideoAggregator * vagg, { GstCaps *src_template; GstPadTemplate *pad_template; + gint i; vagg->priv = gst_video_aggregator_get_instance_private (vagg); vagg->priv->current_caps = NULL; @@ -2800,7 +2801,7 @@ gst_video_aggregator_init (GstVideoAggregator * vagg, pad_template = gst_element_class_get_pad_template (GST_ELEMENT_CLASS (klass), "src"); src_template = gst_pad_template_get_caps (pad_template); - for (gint i = 0; i < gst_caps_get_size (src_template); i++) { + for (i = 0; i < gst_caps_get_size (src_template); i++) { const GValue *v = gst_structure_get_value (gst_caps_get_structure (src_template, i), "format");