mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-20 07:27:07 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user