On date Tuesday 2011-05-17 20:31:53 +0200, Diego Biurrun encoded: > Do not #include avfilter.h conditionally, #include (just) required headers. > --- > cmdutils.h | 10 ++++------ > 1 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/cmdutils.h b/cmdutils.h > index f97ea80..fef2774 100644 > --- a/cmdutils.h > +++ b/cmdutils.h > @@ -22,8 +22,11 @@ > #ifndef LIBAV_CMDUTILS_H > #define LIBAV_CMDUTILS_H > > -#include <inttypes.h> > +#include <stdint.h> > +#include <sys/types.h> > + > #include "libavcodec/avcodec.h" > +#include "libavfilter/avfilter.h" > #include "libavformat/avformat.h" > #include "libswscale/swscale.h" > > @@ -278,9 +281,6 @@ int64_t guess_correct_pts(PtsCorrectionContext *ctx, > int64_t pts, int64_t dts); > FILE *get_preset_file(char *filename, size_t filename_size, > const char *preset_name, int is_path, const char > *codec_name); > > -#if CONFIG_AVFILTER > -#include "libavfilter/avfilter.h" > - > typedef struct { > enum PixelFormat pix_fmt; > } FFSinkContext; > @@ -296,6 +296,4 @@ extern AVFilter ffsink; > int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame, > AVFilterBufferRef **picref, AVRational *pts_tb); > > -#endif /* CONFIG_AVFILTER */ > -
If libavfilter is not enabled (which is still possible, and for some specific purposes even recommended) the declared functions are not compiled, so not having the symbols defined in the binary is safer. -- You don't sew with a fork, so I see no reason to eat with knitting needles. -- Miss Piggy, on eating Chinese Food _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel