hc
2024-03-22 a0752693d998599af469473b8dc239ef973a012f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 613a6d75748b8f87988e103f0a0be466d1753913 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Mon, 14 Dec 2020 07:42:55 +0100
Subject: [PATCH 01/10] 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 <fontaine.fabrice@gmail.com>
[Upstream status:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/974]
---
 gst-libs/gst/video/gstvideoaggregator.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
 
diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c
index 72dc5e9..ed4b15e 100644
--- a/gst-libs/gst/video/gstvideoaggregator.c
+++ b/gst-libs/gst/video/gstvideoaggregator.c
@@ -2755,6 +2755,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;
@@ -2769,7 +2770,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");
-- 
2.20.1