From c19797bf59f0541d6915dab7c1568d5311757d9d Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 9 May 2022 22:30:11 +0200 Subject: avcodec/internal: Hide stuff only used by the core decode API The general decoding API uses bitstream filters and an AVFifo and therefore AVCodecInternal contains pointers to an AVBSFContext and to an AVFifo and lavc/internal.h includes lavc/bsf.h and lavu/fifo.h. Yet actually, only two files are supposed to use these, namely avcodec.c and (mainly) decode.c. For all the other files, it should be an opaque type that they should not touch and that they need not know anything about. This can be achieved by not including these headers and using the structs instead of the corresponding typedefs. This also forces translation units that really use the BSF and the FIFO APIs themselves to include the relevant headers directly instead of relying on indirect inclusions (up until now, even avcodec.c and decode.c relied on fifo.h to be included by internal.h). Of course, it also avoids unnecessary rebuilds when bsf.h or fifo.h change. Signed-off-by: Andreas Rheinhardt --- libavcodec/cuviddec.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libavcodec/cuviddec.c') diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c index 81d4c89215..cb3cda7e24 100644 --- a/libavcodec/cuviddec.c +++ b/libavcodec/cuviddec.c @@ -34,6 +34,7 @@ #include "libavutil/pixdesc.h" #include "avcodec.h" +#include "bsf.h" #include "codec_internal.h" #include "decode.h" #include "hwconfig.h" -- cgit v1.2.3