video-converter: Use G_N_ELEMENTS instead of writing it out manually
authorSebastian Dröge <sebastian@centricular.com>
Mon, 21 Oct 2019 13:43:32 +0000 (16:43 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 22 Oct 2019 06:50:27 +0000 (09:50 +0300)
gst-libs/gst/video/video-converter.c

index c6fcb3b..3a1a726 100644 (file)
@@ -6712,7 +6712,7 @@ video_converter_lookup_fastpath (GstVideoConverter * convert)
       || convert->out_width < convert->out_maxwidth
       || convert->out_height < convert->out_maxheight;
 
-  for (i = 0; i < sizeof (transforms) / sizeof (transforms[0]); i++) {
+  for (i = 0; i < G_N_ELEMENTS (transforms); i++) {
     if (transforms[i].in_format == in_format &&
         transforms[i].out_format == out_format &&
         (transforms[i].keeps_interlaced || !interlaced) &&