[gst-cvs] gst-plugins-gl: gstgleffects: Fix upper bound of an array iteration

Edward Hervey bilboed at kemper.freedesktop.org
Wed Sep 8 12:06:56 PDT 2010


Module: gst-plugins-gl
Branch: master
Commit: a1949034de98f33e8ed4ecf11b4bcfa948f5a78b
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-gl/commit/?id=a1949034de98f33e8ed4ecf11b4bcfa948f5a78b

Author: Edward Hervey <bilboed at bilboed.com>
Date:   Wed Sep  8 20:38:07 2010 +0200

gstgleffects: Fix upper bound of an array iteration

10 is above NEEDED_TEXTURES (currently 5) and makes the code consistent
with the rest of the usage in the file.

---

 gst/gl/gstgleffects.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gst/gl/gstgleffects.c b/gst/gl/gstgleffects.c
index 6fb3806..30d4e2d 100644
--- a/gst/gl/gstgleffects.c
+++ b/gst/gl/gstgleffects.c
@@ -213,7 +213,7 @@ gst_gl_effects_reset_gl_resources (GstGLFilter * filter)
   GstGLEffects *effects = GST_GL_EFFECTS (filter);
   gint i;
 
-  for (i = 0; i < 10; i++) {
+  for (i = 0; i < NEEDED_TEXTURES; i++) {
     glDeleteTextures (1, &effects->midtexture[i]);
     effects->midtexture[i] = 0;
   }





More information about the Gstreamer-commits mailing list