1
0

obs-ffmpeg-compat.h 752 B

1234567891011121314151617181920
  1. #pragma once
  2. #include <libavcodec/avcodec.h>
  3. /* LIBAVCODEC_VERSION_CHECK checks for the right version of libav and FFmpeg
  4. * a is the major version
  5. * b and c the minor and micro versions of libav
  6. * d and e the minor and micro versions of FFmpeg */
  7. #define LIBAVCODEC_VERSION_CHECK(a, b, c, d, e) \
  8. ((LIBAVCODEC_VERSION_MICRO < 100 && \
  9. LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(a, b, c)) || \
  10. (LIBAVCODEC_VERSION_MICRO >= 100 && \
  11. LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(a, d, e)))
  12. #if LIBAVCODEC_VERSION_MAJOR < 60
  13. #define CODEC_CAP_TRUNC AV_CODEC_CAP_TRUNCATED
  14. #define CODEC_FLAG_TRUNC AV_CODEC_FLAG_TRUNCATED
  15. #endif
  16. #define INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE