mpv icon indicating copy to clipboard operation
mpv copied to clipboard

ad_spdif: change deprecated FF_PROFILE to AV_PROFILE

Open mitzsch opened this issue 1 year ago • 3 comments

Change the FF_PROFILE defines that are deprecated to the new AV_PROFILE found in defs.h

FF_PROFILE is deprecated => https://github.com/FFmpeg/FFmpeg/commit/8238bc0b5e3dba271217b1223a901b3f9713dc6e

The "doc/APIchanges" says

2023-09-07 - xxxxxxxxxx - lavc 60.26.100 - defs.h
  Add AV_PROFILE_* and AV_LEVEL_* replacements in defs.h for the
  defines from avcodec.h. The latter are deprecated.

This commit also raises the question of the minimal lavc version... No idea if it's worth raising it to a git version from 2023-09-07 just for that... Other question - are there users that build mpv against "older" ffmpeg versions?

Anyways, maybe consider this one in the future...

mitzsch avatar Jan 24 '24 14:01 mitzsch

are there users that build mpv against "older" ffmpeg versions

There are. This should be behind a version check.

Dudemanguy avatar Jan 24 '24 15:01 Dudemanguy

Since the compatibility stuff is a bit hairy I'd delay this until there's a realistic prospect of ffmpeg actually removing these defines.

sfan5 avatar Jan 24 '24 20:01 sfan5

realistic prospect of ffmpeg actually removing these defines.

They have pretty clear depreciation period. It will be removed once lavc hit version 62. So, in the release cycle after next major version.

#define FF_API_FF_PROFILE_LEVEL (LIBAVCODEC_VERSION_MAJOR < 62)

https://github.com/FFmpeg/FFmpeg/commit/8238bc0b5e3dba271217b1223a901b3f9713dc6e#diff-ad81ede7da099f4355c4233493a776aaff663e33c7dd66e94fb0cd9f894cd48aR54

EDIT: incidentally they are bumping the major version as we speak https://ffmpeg.org/pipermail/ffmpeg-devel/2024-January/320129.html so the FF_API_FF_PROFILE_LEVEL will be removed on next bump, which as you can image is quite far away as of now.

Although I think depreciation should be fixed as they arrive, this ensure forward compatibility with next ffmpeg versions which is nice if one mpv stable version would linger longer.

kasper93 avatar Jan 26 '24 02:01 kasper93