diff --git a/libavcodec/flac.h b/libavcodec/flac.h
index da39456dcf9988756a26e3203a854a58e644076a..d9da14927c0fffc243209082eab6b4e5b64dcf53 100644
--- a/libavcodec/flac.h
+++ b/libavcodec/flac.h
@@ -27,6 +27,8 @@
 #ifndef FFMPEG_FLAC_H
 #define FFMPEG_FLAC_H
 
+#include "avcodec.h"
+
 /**
  * Data needed from the Streaminfo header for use by the raw FLAC demuxer
  * and/or the FLAC decoder.