diff --git a/libavcodec/error_resilience.h b/libavcodec/error_resilience.h
index 949c58f245a7fe6bdb28dc05fa326491f4c53457..f979656ab728220a21ea30cae16f65d49d365f17 100644
--- a/libavcodec/error_resilience.h
+++ b/libavcodec/error_resilience.h
@@ -20,6 +20,11 @@
 #ifndef AVCODEC_ERROR_RESILIENCE_H
 #define AVCODEC_ERROR_RESILIENCE_H
 
+#include <stdint.h>
+
+#include "avcodec.h"
+#include "dsputil.h"
+
 ///< current MB is the first after a resync marker
 #define VP_START               1
 #define ER_AC_ERROR            2