deps/media-playback: Use new (nb_)coded_side_data FFmpeg 6.1 API
Fixes for using FFmpeg 6.1 due to deprecations. Uses `#if` macros to
allow builds for using older versions of FFmpeg.
The change in deps/media-playback/media-playback/decode.c is due to
FFmpeg moving "side_data" into AVCodecParameters which is mentioned in
commit [1] in FFmpeg's repository.
In summary of the "side_data" change, AVStream.side_data is deprecated
and replaced with AVStream.codecpar->coded_side_data, and
AVStream.nb_side_data is replaced with
AVStream.codecpar->nb_coded_side_data.
[1]: avcodec/codec_par: add side data to AVCodecParameters
21d7cc6fa9
This commit is contained in:
parent
f5b7c98d2d
commit
4b5be75c7e
1 changed files with 6 additions and 0 deletions
6
deps/media-playback/media-playback/decode.c
vendored
6
deps/media-playback/media-playback/decode.c
vendored
|
|
@ -114,8 +114,14 @@ static uint16_t get_max_luminance(const AVStream *stream)
|
|||
{
|
||||
uint32_t max_luminance = 0;
|
||||
|
||||
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
|
||||
for (int i = 0; i < stream->nb_side_data; i++) {
|
||||
const AVPacketSideData *const sd = &stream->side_data[i];
|
||||
#else
|
||||
for (int i = 0; i < stream->codecpar->nb_coded_side_data; i++) {
|
||||
const AVPacketSideData *const sd =
|
||||
&stream->codecpar->coded_side_data[i];
|
||||
#endif
|
||||
switch (sd->type) {
|
||||
case AV_PKT_DATA_MASTERING_DISPLAY_METADATA: {
|
||||
const AVMasteringDisplayMetadata *mastering =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue