diff --git a/configure b/configure
index f204dc28d5958710300352d1dc3f34156296c501..eb5147615cc1808ef27e2b4d6cdc7ef8ef34d1f5 100755
--- a/configure
+++ b/configure
@@ -2426,6 +2426,7 @@ unix_protocol_deps="sys_un_h"
 unix_protocol_select="network"
 
 # filters
+asyncts_filter_deps="avresample"
 blackframe_filter_deps="gpl"
 boxblur_filter_deps="gpl"
 bs2b_filter_deps="libbs2b"
@@ -2440,6 +2441,7 @@ frei0r_src_filter_extralibs='$ldl'
 hdcd_filter_deps="libhdcd"
 hqdn3d_filter_deps="gpl"
 interlace_filter_deps="gpl"
+movie_filter_deps="avcodec avformat"
 ocv_filter_deps="libopencv"
 resample_filter_deps="avresample"
 scale_filter_deps="swscale"
@@ -2453,7 +2455,7 @@ encode_audio_example_deps="avcodec avutil"
 encode_video_example_deps="avcodec avutil"
 filter_audio_example_deps="avfilter avutil"
 metadata_example_deps="avformat avutil"
-output_example_deps="avcodec avformat avutil swscale"
+output_example_deps="avcodec avformat avresample avutil swscale"
 qsvdec_example_deps="avcodec avutil libmfx h264_qsv_decoder"
 transcode_aac_example_deps="avcodec avformat avresample"
 
@@ -5109,7 +5111,8 @@ enabled zlib && add_cppflags -DZLIB_CONST
 
 # conditional library dependencies, in linking order
 enabled movie_filter    && prepend avfilter_deps "avformat avcodec"
-enabled resample_filter && prepend avfilter_deps "avresample"
+enabled_any asyncts_filter resample_filter &&
+                           prepend avfilter_deps "avresample"
 enabled scale_filter    && prepend avfilter_deps "swscale"
 
 enabled opus_decoder    && prepend avcodec_deps "avresample"
diff --git a/libavfilter/vsrc_movie.c b/libavfilter/vsrc_movie.c
index 5989a59190963ea377201b1e39f71337f598f173..7fc99258488b53142cf17aea49d6b51debbfb3b7 100644
--- a/libavfilter/vsrc_movie.c
+++ b/libavfilter/vsrc_movie.c
@@ -35,7 +35,11 @@
 #include "libavutil/avstring.h"
 #include "libavutil/opt.h"
 #include "libavutil/imgutils.h"
+
+#include "libavcodec/avcodec.h"
+
 #include "libavformat/avformat.h"
+
 #include "avfilter.h"
 #include "formats.h"
 #include "internal.h"