diff --git a/contrib/src/libav/rules.mak b/contrib/src/libav/rules.mak
index a77625b141adcd4af8c3a1d5b9ab257e77d15222..f010f45532770cc51587e37e995c7d74b0303e40 100644
--- a/contrib/src/libav/rules.mak
+++ b/contrib/src/libav/rules.mak
@@ -4,7 +4,12 @@ LIBAV_GITURL := git://git.libav.org/libav.git
 
 PKGS += libav
 
+#disable everything
+#ensure to add this option first
 LIBAVCONF = \
+		--disable-everything
+
+LIBAVCONF += \
 		--cc="$(CC)" \
 		--pkg-config="$(PKG_CONFIG)" \
 		--enable-zlib \
@@ -12,9 +17,6 @@ LIBAVCONF = \
 		--enable-swscale \
 		--enable-protocols
 
-#disable everything
-LIBAVCONF += \
-		--disable-everything
 
 #enable muxers/demuxers
 LIBAVCONF += \