aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-09-23 16:43:00 -0300
committerJames Almer <jamrial@gmail.com>2022-09-24 12:17:22 -0300
commit1b47190c94317d0d1bb5c60a43005ed78b4808a2 (patch)
treedb3cd575fe93e2abde65bcc38ecf7fd3f126de49
parentaa79d13f51aa820c7e5f07784a2512434e68bc46 (diff)
downloadffmpeg-1b47190c94317d0d1bb5c60a43005ed78b4808a2.tar.gz
avcodec/opusdec: stop setting deprecated swr options
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/opusdec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c
index c04aa598b8..d255486d06 100644
--- a/libavcodec/opusdec.c
+++ b/libavcodec/opusdec.c
@@ -640,7 +640,7 @@ static av_cold int opus_decode_init(AVCodecContext *avctx)
for (i = 0; i < c->nb_streams; i++) {
OpusStreamContext *s = &c->streams[i];
- uint64_t layout;
+ AVChannelLayout layout;
s->output_channels = (i < c->nb_stereo_streams) ? 2 : 1;
@@ -658,11 +658,12 @@ static av_cold int opus_decode_init(AVCodecContext *avctx)
if (!s->swr)
return AVERROR(ENOMEM);
- layout = (s->output_channels == 1) ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
+ layout = (s->output_channels == 1) ? (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO :
+ (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO;
av_opt_set_int(s->swr, "in_sample_fmt", avctx->sample_fmt, 0);
av_opt_set_int(s->swr, "out_sample_fmt", avctx->sample_fmt, 0);
- av_opt_set_int(s->swr, "in_channel_layout", layout, 0);
- av_opt_set_int(s->swr, "out_channel_layout", layout, 0);
+ av_opt_set_chlayout(s->swr, "in_chlayout", &layout, 0);
+ av_opt_set_chlayout(s->swr, "out_chlayout", &layout, 0);
av_opt_set_int(s->swr, "out_sample_rate", avctx->sample_rate, 0);
av_opt_set_int(s->swr, "filter_size", 16, 0);