diff --git a/libswresample/swresample.h b/libswresample/swresample.h
index 2d24f952e0d91f7bd439304a5d6dea88c5164b0a..f860f7cdd6cf923b3525df2c10bfbe3bdb9c0d48 100644
--- a/libswresample/swresample.h
+++ b/libswresample/swresample.h
@@ -37,7 +37,9 @@
                                                   LIBSWRESAMPLE_VERSION_MINOR, \
                                                   LIBSWRESAMPLE_VERSION_MICRO)
 
+#if LIBSWRESAMPLE_VERSION_MAJOR < 1
 #define SWR_CH_MAX 32   ///< Maximum number of channels
+#endif
 
 #define SWR_FLAG_RESAMPLE 1 ///< Force resampling even if equal sample rate
 //TODO use int resample ?