libobs: Fence off unnecessary code due to FFmpeg v6.1 changes

Fixes for using FFmpeg 6.1 due to deprecations. Uses `#if` macros to
allow builds for using older versions of FFmpeg.

This commit prevents obs from using the "fenced" code if using FFmpeg
6.1, since in FFmpeg commit [1] the "side_data" is added to
`AVCodecParameters`, and therefore the existing/following
`avcodec_parameters_copy(...)` will account for the metadata.

[1]: avcodec/codec_par: add side data to AVCodecParameters
21d7cc6fa9
This commit is contained in:
Stephen Seo
2023-11-29 20:07:10 +09:00
committed by Lain
parent 6e080a6806
commit cd784644f5

View File

@@ -91,6 +91,7 @@ static inline bool init_output(media_remux_job_t job, const char *out_filename)
return false;
}
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
#if FF_API_BUFFER_SIZE_T
int content_size;
#else
@@ -125,6 +126,7 @@ static inline bool init_output(media_remux_job_t job, const char *out_filename)
mastering_size);
}
}
#endif
ret = avcodec_parameters_copy(out_stream->codecpar,
in_stream->codecpar);