From 1dcd0adedd15f2595d51febbfc171c576c9e080a Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 22 Mar 2022 13:06:05 +0100 Subject: [PATCH] avformat: Remove unnecessary inclusions from libavcodec Also improve the other headers a bit while at it. Signed-off-by: Andreas Rheinhardt --- libavformat/a64.c | 2 +- libavformat/act.c | 3 ++- libavformat/apngenc.c | 2 -- libavformat/av1.c | 2 +- libavformat/flacenc.h | 5 ++--- libavformat/flvdec.c | 5 ++--- libavformat/frmdec.c | 1 - libavformat/gxf.c | 1 - libavformat/h261dec.c | 2 +- libavformat/hls.c | 1 + libavformat/hls_sample_encryption.c | 1 + libavformat/hls_sample_encryption.h | 5 +++-- libavformat/icodec.c | 1 - libavformat/oggparseskeleton.c | 2 +- libavformat/oggparsespeex.c | 7 +------ libavformat/rsd.c | 1 - libavformat/rtpdec_dv.c | 4 +--- libavformat/rtpdec_hevc.c | 2 -- libavformat/rtpdec_vp8.c | 4 ++-- 19 files changed, 19 insertions(+), 32 deletions(-) diff --git a/libavformat/a64.c b/libavformat/a64.c index 6e19162fe2..a66f2542b7 100644 --- a/libavformat/a64.c +++ b/libavformat/a64.c @@ -19,9 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/intreadwrite.h" #include "libavcodec/codec_id.h" #include "libavcodec/codec_par.h" -#include "libavcodec/bytestream.h" #include "avformat.h" #include "rawenc.h" diff --git a/libavformat/act.c b/libavformat/act.c index fba106c520..6dd9f62a87 100644 --- a/libavformat/act.c +++ b/libavformat/act.c @@ -18,11 +18,12 @@ * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "libavutil/intreadwrite.h" #include "avformat.h" #include "avio_internal.h" #include "riff.h" #include "internal.h" -#include "libavcodec/get_bits.h" #define CHUNK_SIZE 512 #define RIFF_TAG MKTAG('R','I','F','F') diff --git a/libavformat/apngenc.c b/libavformat/apngenc.c index 767074ecf3..88d4a41462 100644 --- a/libavformat/apngenc.c +++ b/libavformat/apngenc.c @@ -22,14 +22,12 @@ */ #include "avformat.h" -#include "internal.h" #include "libavutil/avassert.h" #include "libavutil/crc.h" #include "libavutil/intreadwrite.h" #include "libavutil/log.h" #include "libavutil/opt.h" #include "libavcodec/png.h" -#include "libavcodec/apng.h" typedef struct APNGMuxContext { AVClass *class; diff --git a/libavformat/av1.c b/libavformat/av1.c index 7caea0c377..79065d0c9f 100644 --- a/libavformat/av1.c +++ b/libavformat/av1.c @@ -23,7 +23,7 @@ #include "libavutil/mem.h" #include "libavcodec/av1.h" #include "libavcodec/av1_parse.h" -#include "libavcodec/profiles.h" +#include "libavcodec/avcodec.h" #include "libavcodec/put_bits.h" #include "av1.h" #include "avio.h" diff --git a/libavformat/flacenc.h b/libavformat/flacenc.h index b308d0d021..02937b240d 100644 --- a/libavformat/flacenc.h +++ b/libavformat/flacenc.h @@ -22,9 +22,8 @@ #ifndef AVFORMAT_FLACENC_H #define AVFORMAT_FLACENC_H -#include "libavcodec/flac.h" -#include "libavcodec/bytestream.h" -#include "avformat.h" +#include +#include "avio.h" int ff_flac_write_header(AVIOContext *pb, const uint8_t *extradata, int extradata_size, int last_block); diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index cb24b1cc26..0c90748422 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -24,18 +24,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/channel_layout.h" #include "libavutil/dict.h" #include "libavutil/opt.h" #include "libavutil/internal.h" #include "libavutil/intfloat.h" +#include "libavutil/intreadwrite.h" #include "libavutil/mathematics.h" -#include "libavutil/time_internal.h" -#include "libavcodec/bytestream.h" #include "avformat.h" #include "internal.h" -#include "avio_internal.h" #include "flv.h" #define VALIDATE_INDEX_TS_THRESH 2500 diff --git a/libavformat/frmdec.c b/libavformat/frmdec.c index 478656b037..e6c1179dcd 100644 --- a/libavformat/frmdec.c +++ b/libavformat/frmdec.c @@ -24,7 +24,6 @@ * Megalux Frame demuxer */ -#include "libavcodec/raw.h" #include "libavutil/imgutils.h" #include "libavutil/intreadwrite.h" #include "avformat.h" diff --git a/libavformat/gxf.c b/libavformat/gxf.c index d96e0796f4..e61291382a 100644 --- a/libavformat/gxf.c +++ b/libavformat/gxf.c @@ -26,7 +26,6 @@ #include "avformat.h" #include "internal.h" #include "gxf.h" -#include "libavcodec/mpeg12data.h" struct gxf_stream_info { int64_t first_field; diff --git a/libavformat/h261dec.c b/libavformat/h261dec.c index b5161ff57d..0fca1a340a 100644 --- a/libavformat/h261dec.c +++ b/libavformat/h261dec.c @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavcodec/get_bits.h" +#include "libavutil/intreadwrite.h" #include "avformat.h" #include "rawdec.h" diff --git a/libavformat/hls.c b/libavformat/hls.c index 0541d3c610..83ff4cc607 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -30,6 +30,7 @@ #include "config_components.h" #include "libavformat/http.h" +#include "libavutil/aes.h" #include "libavutil/avstring.h" #include "libavutil/avassert.h" #include "libavutil/intreadwrite.h" diff --git a/libavformat/hls_sample_encryption.c b/libavformat/hls_sample_encryption.c index 159a6edc6e..08cdf964b6 100644 --- a/libavformat/hls_sample_encryption.c +++ b/libavformat/hls_sample_encryption.c @@ -26,6 +26,7 @@ * https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/HLS_Sample_Encryption */ +#include "libavutil/aes.h" #include "libavutil/channel_layout.h" #include "hls_sample_encryption.h" diff --git a/libavformat/hls_sample_encryption.h b/libavformat/hls_sample_encryption.h index ff3f9c22f7..d86eccb74c 100644 --- a/libavformat/hls_sample_encryption.h +++ b/libavformat/hls_sample_encryption.h @@ -29,12 +29,13 @@ #ifndef AVFORMAT_HLS_SAMPLE_ENCRYPTION_H #define AVFORMAT_HLS_SAMPLE_ENCRYPTION_H +#include #include +#include "libavcodec/codec_id.h" +#include "libavcodec/packet.h" #include "avformat.h" -#include "libavcodec/avcodec.h" -#include "libavutil/aes.h" #define HLS_MAX_ID3_TAGS_DATA_LEN 138 #define HLS_MAX_AUDIO_SETUP_DATA_LEN 10 diff --git a/libavformat/icodec.c b/libavformat/icodec.c index 2e677c78f1..290f658d0c 100644 --- a/libavformat/icodec.c +++ b/libavformat/icodec.c @@ -26,7 +26,6 @@ #include "libavutil/intreadwrite.h" #include "libavcodec/bytestream.h" -#include "libavcodec/bmp.h" #include "libavcodec/png.h" #include "avformat.h" #include "internal.h" diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c index 532fa6aefa..2016b16c95 100644 --- a/libavformat/oggparseskeleton.c +++ b/libavformat/oggparseskeleton.c @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavcodec/bytestream.h" +#include "libavutil/intreadwrite.h" #include "avformat.h" #include "internal.h" #include "oggdec.h" diff --git a/libavformat/oggparsespeex.c b/libavformat/oggparsespeex.c index 7d3d653384..d20d14fa41 100644 --- a/libavformat/oggparsespeex.c +++ b/libavformat/oggparsespeex.c @@ -22,13 +22,8 @@ DEALINGS IN THE SOFTWARE. **/ -#include - -#include "libavutil/bswap.h" -#include "libavutil/avstring.h" #include "libavutil/channel_layout.h" - -#include "libavcodec/bytestream.h" +#include "libavutil/intreadwrite.h" #include "avformat.h" #include "internal.h" diff --git a/libavformat/rsd.c b/libavformat/rsd.c index 65316f0219..c3b570da22 100644 --- a/libavformat/rsd.c +++ b/libavformat/rsd.c @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "libavcodec/bytestream.h" #include "libavutil/intreadwrite.h" #include "avformat.h" #include "avio.h" diff --git a/libavformat/rtpdec_dv.c b/libavformat/rtpdec_dv.c index 53a5855ad3..fa75a77a84 100644 --- a/libavformat/rtpdec_dv.c +++ b/libavformat/rtpdec_dv.c @@ -21,10 +21,8 @@ #include "libavutil/avstring.h" -#include "libavcodec/bytestream.h" - #include "avio_internal.h" -#include "rtpdec_formats.h" +#include "rtpdec.h" struct PayloadContext { AVIOContext *buf; diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c index f467104ca5..a739ed5bd2 100644 --- a/libavformat/rtpdec_hevc.c +++ b/libavformat/rtpdec_hevc.c @@ -21,8 +21,6 @@ #include "libavutil/avassert.h" #include "libavutil/avstring.h" -#include "libavutil/base64.h" -#include "libavcodec/get_bits.h" #include "avformat.h" #include "internal.h" diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c index 360dd5c782..6701ad59f9 100644 --- a/libavformat/rtpdec_vp8.c +++ b/libavformat/rtpdec_vp8.c @@ -27,10 +27,10 @@ * @see http://tools.ietf.org/html/draft-ietf-payload-vp8-05 */ -#include "libavcodec/bytestream.h" +#include "libavutil/intreadwrite.h" #include "avio_internal.h" -#include "rtpdec_formats.h" +#include "rtpdec.h" struct PayloadContext { AVIOContext *data;