avformat/internal: Use forward declaration for AVCodecDescriptor
This avoids including lavc/codec_desc.h everywhere and thereby forces users to include it directly instead of lazily and potentially unknowingly relying on indirect inclusions. Also add the proper inclusion to libavformat/demux.c, one of the two files that actually use the new field. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include "libavcodec/avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
#include "libavcodec/bsf.h"
|
#include "libavcodec/bsf.h"
|
||||||
|
#include "libavcodec/codec_desc.h"
|
||||||
#include "libavcodec/internal.h"
|
#include "libavcodec/internal.h"
|
||||||
#include "libavcodec/packet_internal.h"
|
#include "libavcodec/packet_internal.h"
|
||||||
#include "libavcodec/raw.h"
|
#include "libavcodec/raw.h"
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "libavcodec/codec_desc.h"
|
|
||||||
#include "libavcodec/packet_internal.h"
|
#include "libavcodec/packet_internal.h"
|
||||||
|
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
@@ -410,7 +409,7 @@ typedef struct FFStream {
|
|||||||
int64_t first_dts;
|
int64_t first_dts;
|
||||||
int64_t cur_dts;
|
int64_t cur_dts;
|
||||||
|
|
||||||
const AVCodecDescriptor *codec_desc;
|
const struct AVCodecDescriptor *codec_desc;
|
||||||
} FFStream;
|
} FFStream;
|
||||||
|
|
||||||
static av_always_inline FFStream *ffstream(AVStream *st)
|
static av_always_inline FFStream *ffstream(AVStream *st)
|
||||||
|
|||||||
Reference in New Issue
Block a user