diff mbox series

[FFmpeg-devel,16/25] lavf/avformat.h: drop the avcodec.h include

Message ID 20210521180056.17496-16-anton@khirnov.net
State Accepted
Commit e67e02d15672a87da1b0566e197a1e19dc7e1e33
Headers show
Series [FFmpeg-devel,01/25] lavc: move small misc definitions into a separate header | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Anton Khirnov May 21, 2021, 6 p.m. UTC
Since AVStream.codec is gone, avformat.h does not require anything from
avcodec.h.
---
 libavformat/avformat.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Michael Niedermayer May 23, 2021, 6:05 p.m. UTC | #1
On Fri, May 21, 2021 at 08:00:47PM +0200, Anton Khirnov wrote:
> Since AVStream.codec is gone, avformat.h does not require anything from
> avcodec.h.
> ---
>  libavformat/avformat.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

seems to break alltools build here

tools/uncoded_frame.c: In function ‘main’:
tools/uncoded_frame.c:179:52: error: implicit declaration of function ‘av_get_pcm_codec’; did you mean ‘av_guess_codec’? [-Werror=implicit-function-declaration]
             st->stream->codecpar->codec_id       = av_get_pcm_codec(st->stream->codecpar->format, -1);
                                                    ^~~~~~~~~~~~~~~~
                                                    av_guess_codec
cc1: some warnings being treated as errors
ffbuild/common.mak:67: recipe for target 'tools/uncoded_frame.o' failed
make: *** [tools/uncoded_frame.o] Error 1

[...]
diff mbox series

Patch

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index a28ac372da..92807e9657 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -309,7 +309,12 @@ 
 
 #include <time.h>
 #include <stdio.h>  /* FILE */
-#include "libavcodec/avcodec.h"
+
+#include "libavcodec/codec.h"
+#include "libavcodec/codec_par.h"
+#include "libavcodec/defs.h"
+#include "libavcodec/packet.h"
+
 #include "libavutil/dict.h"
 #include "libavutil/log.h"