diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 9304c19ba23210595cd31a822957a490d0849234..aa54ff27a8d1fbe8a125a3c420847816f4fab687 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -3,6 +3,7 @@ include $(SUBDIR)../config.mak
 NAME = avfilter
 FFLIBS = avcore avutil
 FFLIBS-$(CONFIG_SCALE_FILTER) += swscale
+FFLIBS-$(CONFIG_MP_FILTER) += avcodec
 
 HEADERS = avfilter.h avfiltergraph.h