inttypes.h is not necessary, just stdint.h is enough. Unconditionally #include avfilter.h in cmdutils.h. It is an installed header with no non-standard external dependencies, so it is safe.
Unified · Split
| @@ -22,8 +22,10 @@ · 21 unmodified lines | |||
| 22 | #ifndef FFMPEG_CMDUTILS_H | 22 | #ifndef FFMPEG_CMDUTILS_H |
| 23 | #define FFMPEG_CMDUTILS_H | 23 | #define FFMPEG_CMDUTILS_H |
| 24 | 24 | ||
| 25 | #include <inttypes.h> | 25 | #include <stdint.h> |
| 26 | |||
| 26 | #include "libavcodec/avcodec.h" | 27 | #include "libavcodec/avcodec.h" |
| 28 | #include "libavfilter/avfilter.h" | ||
| 27 | #include "libavformat/avformat.h" | 29 | #include "libavformat/avformat.h" |
| 28 | #include "libswscale/swscale.h" | 30 | #include "libswscale/swscale.h" |
| 29 | 31 | ||
| @@ -278,9 +280,6 @@ int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t pts, int64_t dts); · 248 unmodified lines | |||
| 278 | FILE *get_preset_file(char *filename, size_t filename_size, | 280 | FILE *get_preset_file(char *filename, size_t filename_size, |
| 279 | const char *preset_name, int is_path, const char *codec_name); | 281 | const char *preset_name, int is_path, const char *codec_name); |
| 280 | 282 | ||
| 281 | #if CONFIG_AVFILTER | ||
| 282 | #include "libavfilter/avfilter.h" | ||
| 283 | |||
| 284 | typedef struct { | 283 | typedef struct { |
| 285 | enum PixelFormat pix_fmt; | 284 | enum PixelFormat pix_fmt; |
| 286 | } FFSinkContext; | 285 | } FFSinkContext; |
| @@ -296,6 +295,4 @@ extern AVFilter ffsink; · 9 unmodified lines | |||
| 296 | int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame, | 295 | int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame, |
| 297 | AVFilterBufferRef **picref, AVRational *pts_tb); | 296 | AVFilterBufferRef **picref, AVRational *pts_tb); |
| 298 | 297 | ||
| 299 | #endif /* CONFIG_AVFILTER */ | ||
| 300 | |||
| 301 | #endif /* FFMPEG_CMDUTILS_H */ | 298 | #endif /* FFMPEG_CMDUTILS_H */ |