diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index a29927f1dd603ee264b1bc04ea98e9d74f1b22c5..39158f3ea21b529661c51aa507ebae070bfbb998 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -724,7 +724,9 @@ SKIPHEADERS                            += %_tablegen.h                  \
 SKIPHEADERS-$(CONFIG_DXVA2)            += dxva2.h dxva2_internal.h
 SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER)  += libschroedinger.h
 SKIPHEADERS-$(CONFIG_MPEG_XVMC_DECODER) += xvmc.h
-SKIPHEADERS-$(CONFIG_QSVDEC)           += qsv.h qsvdec.h qsv_internal.h
+SKIPHEADERS-$(CONFIG_QSV)              += qsv.h qsv_internal.h
+SKIPHEADERS-$(CONFIG_QSVDEC)           += qsvdec.h
+SKIPHEADERS-$(CONFIG_QSVENC)           += qsvenc.h
 SKIPHEADERS-$(CONFIG_VAAPI)            += vaapi_internal.h
 SKIPHEADERS-$(CONFIG_VDA)              += vda.h vda_internal.h
 SKIPHEADERS-$(CONFIG_VDPAU)            += vdpau.h vdpau_internal.h