Hi, On 25/01/18 04:05, salsaman wrote: > Thanks. Will take a look. > > What is the recommended compile time check for this version ? > LIBAVCODE_VERSION_MAJOR > ????? ?
For libavcodec from FFmpeg 3.5 / Libav 12 you can use: LIBAVCODEC_VERSION_MAJOR >= 58 However, there should be no reason to do this because all the removed APIs have been deprecated for years now. You should instead check the version at the time the feature was removed. In this case you want the version that AV_INPUT_BUFFER_PADDING_SIZE was added. This can be found in doc/APIchanges: > 2015-07-27 - lavc 56.56.100 / 56.35.0 - avcodec.h > 94d68a4 / 7c6eb0a1 - Rename CODEC_FLAG* defines to AV_CODEC_FLAG*. > 444e987 / def97856 - Rename CODEC_CAP_* defines to AV_CODEC_CAP_*. > 29d147c / 059a9348 - Rename FF_INPUT_BUFFER_PADDING_SIZE and > FF_MIN_BUFFER_SIZE > to AV_INPUT_BUFFER_PADDING_SIZE and AV_INPUT_BUFFER_MIN_SIZE. The first version is for FFmpeg, the second is for Libav (sigh). So I think you want: #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 56, 0) Alternatively since FFmpeg 3.0 bumped the major version, you could be more strict and check on: #if LIBAVCODEC_VERSION_MAJOR >= 57 Thanks, James
signature.asc
Description: OpenPGP digital signature