]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10184: [Build-System] Fix missing #ifdefs for proper build w/o libyuv/libvpx
authorMike Jerris <mike@jerris.com>
Mon, 27 Mar 2017 16:50:48 +0000 (11:50 -0500)
committerMike Jerris <mike@jerris.com>
Mon, 27 Mar 2017 16:50:48 +0000 (11:50 -0500)
src/switch_core_video.c

index 3d1e78da74706995096b81f27b57f88d6e36b79e..6a3fe05f692023e4352cf5988b292cfdd11d45b2 100644 (file)
@@ -305,6 +305,7 @@ SWITCH_DECLARE(void) switch_img_free(switch_image_t **img)
 #define MAX(a,b) ((a) > (b) ? (a) : (b))
 #endif
 
+#ifdef SWITCH_HAVE_YUV
 static void switch_img_patch_rgb_noalpha(switch_image_t *IMG, switch_image_t *img, int x, int y)
 {
        int i;
@@ -340,9 +341,11 @@ static void switch_img_patch_rgb_noalpha(switch_image_t *IMG, switch_image_t *im
                }
        }
 }
+#endif
 
 SWITCH_DECLARE(void) switch_img_attenuate(switch_image_t *img)
 {
+#ifdef SWITCH_HAVE_YUV
        if (img->fmt != SWITCH_IMG_FMT_ARGB) {
                return;
        }
@@ -353,10 +356,15 @@ SWITCH_DECLARE(void) switch_img_attenuate(switch_image_t *img)
 
        ARGBAttenuate(img->planes[SWITCH_PLANE_PACKED], img->stride[SWITCH_PLANE_PACKED],
                                  img->planes[SWITCH_PLANE_PACKED], img->stride[SWITCH_PLANE_PACKED], img->d_w, img->d_h);
+#else
+       return;
+#endif
+
 }
 
 SWITCH_DECLARE(void) switch_img_patch_rgb(switch_image_t *IMG, switch_image_t *img, int x, int y, switch_bool_t noalpha)
 {
+#ifdef SWITCH_HAVE_YUV
        int i;
 
        if (noalpha) {
@@ -402,6 +410,7 @@ SWITCH_DECLARE(void) switch_img_patch_rgb(switch_image_t *IMG, switch_image_t *i
                        dst_argb += dst_stride_argb;
                }
        }
+#endif
 }
 
 SWITCH_DECLARE(void) switch_img_patch(switch_image_t *IMG, switch_image_t *img, int x, int y)