0001-gst-libs-gst-video-gstvideoaggregator.c-fix-build-wi.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 012ca1bcd234ee02f576dd58b1f09baba18b89b0 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Mon, 14 Dec 2020 07:42:55 +0100
  4. Subject: [PATCH] gst-libs/gst/video/gstvideoaggregator.c: fix build with gcc
  5. 4.8
  6. Fix the following build failure with gcc 4.8 which has been added with
  7. https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/d268c193ad39fb970351ed62898be806ebd0a71e:
  8. ../gst-libs/gst/video/gstvideoaggregator.c: In function 'gst_video_aggregator_init':
  9. ../gst-libs/gst/video/gstvideoaggregator.c:2762:3: error: 'for' loop initial declarations are only allowed in C99 mode
  10. for (gint i = 0; i < gst_caps_get_size (src_template); i++) {
  11. ^
  12. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  13. [Upstream status:
  14. https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/974]
  15. ---
  16. gst-libs/gst/video/gstvideoaggregator.c | 3 ++-
  17. 1 file changed, 2 insertions(+), 1 deletion(-)
  18. diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c
  19. index 2e3d813be..04dad6563 100644
  20. --- a/gst-libs/gst/video/gstvideoaggregator.c
  21. +++ b/gst-libs/gst/video/gstvideoaggregator.c
  22. @@ -2786,6 +2786,7 @@ gst_video_aggregator_init (GstVideoAggregator * vagg,
  23. {
  24. GstCaps *src_template;
  25. GstPadTemplate *pad_template;
  26. + gint i;
  27. vagg->priv = gst_video_aggregator_get_instance_private (vagg);
  28. vagg->priv->current_caps = NULL;
  29. @@ -2800,7 +2801,7 @@ gst_video_aggregator_init (GstVideoAggregator * vagg,
  30. pad_template =
  31. gst_element_class_get_pad_template (GST_ELEMENT_CLASS (klass), "src");
  32. src_template = gst_pad_template_get_caps (pad_template);
  33. - for (gint i = 0; i < gst_caps_get_size (src_template); i++) {
  34. + for (i = 0; i < gst_caps_get_size (src_template); i++) {
  35. const GValue *v =
  36. gst_structure_get_value (gst_caps_get_structure (src_template, i),
  37. "format");
  38. --
  39. 2.29.2