mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-31 02:13:51 +08:00
758b47d4ed
Fixes for using FFmpeg 6.1 due to deprecations. Uses `#if` macros to allow builds for using older versions of FFmpeg. This commit replaces usage of `av_stream_add_side_data(...)` with `av_packet_side_data_add(...)`, as the former was deprecated in favor of the latter. The FFmpeg commit that deprecated `av_stream_add_side_data(...)` is [1]. The FFmpeg commit that introduced `av_packet_side_data_add(...)` is [2]. Note that the deprecation commit is after the new API function. The commit in between [3] appears to be changes that migrates to the usage of the new API function. [1]: avformat/avformat: use the side data from AVStream.codecpar https://github.com/FFmpeg/FFmpeg/commit/5432d2aacad5fa7420fe2d9369ed061d521e92d6 [2]: avcodec/packet: add generic side data helpers https://github.com/FFmpeg/FFmpeg/commit/74279227dd28d01b447edb8e617a545982171c2c [3]: avcodec/codec_par: add side data to AVCodecParameters https://github.com/FFmpeg/FFmpeg/commit/21d7cc6fa9a26e94965fa71b25655d07568450fe