diff options
author | Anton Khirnov <anton@khirnov.net> | 2019-05-15 09:36:26 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:29 -0300 |
commit | ac10e3c47cc2d252822ff5ca70fce2ef40df4277 (patch) | |
tree | 2c4462f19924c570a9d9c3172626ea4e718ab4ab /libavformat/utils.c | |
parent | c30e22c9fb1a3d1c3b62c6bc1ff9f8b6a0f41dcc (diff) |
lavf: convert the generic layer to the new channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 3c775cf6c6..91c8a15a89 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -525,7 +525,7 @@ int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, continue; if (wanted_stream_nb >= 0 && real_stream_index != wanted_stream_nb) continue; - if (type == AVMEDIA_TYPE_AUDIO && !(par->channels && par->sample_rate)) + if (type == AVMEDIA_TYPE_AUDIO && !(par->ch_layout.nb_channels && par->sample_rate)) continue; if (decoder_ret) { decoder = ff_find_decoder(ic, st, par->codec_id); @@ -1523,7 +1523,7 @@ static int match_stream_specifier(const AVFormatContext *s, const AVStream *st, int val; switch (par->codec_type) { case AVMEDIA_TYPE_AUDIO: - val = par->sample_rate && par->channels; + val = par->sample_rate && par->ch_layout.nb_channels; if (par->format == AV_SAMPLE_FMT_NONE) return 0; break; |