mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 14:09:51 -05:00
[xcode] Use ffmpeg ch_layout instead of deprecated channel_layout/channels (#1536)
Co-authored-by: whatdoineed2do/Ray <whatdoineed2do@nospam.gmail.com>
This commit is contained in:
@@ -452,7 +452,11 @@ scan_metadata_ffmpeg(struct media_file_info *mfi, const char *file)
|
||||
codec_id = ctx->streams[i]->codecpar->codec_id;
|
||||
sample_rate = ctx->streams[i]->codecpar->sample_rate;
|
||||
sample_fmt = ctx->streams[i]->codecpar->format;
|
||||
#ifdef HAVE_FFMPEG_CH_LAYOUT
|
||||
channels = ctx->streams[i]->codecpar->ch_layout.nb_channels;
|
||||
#else
|
||||
channels = ctx->streams[i]->codecpar->channels;
|
||||
#endif
|
||||
switch (codec_type)
|
||||
{
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
|
||||
Reference in New Issue
Block a user