summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/pcmdec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c
index 51b1098430..11ba0b5c0c 100644
--- a/libavformat/pcmdec.c
+++ b/libavformat/pcmdec.c
@@ -180,7 +180,12 @@ PCMDEF(vidc, "PCM Archimedes VIDC", NULL, VIDC)
#if CONFIG_SLN_DEMUXER
static const AVOption sln_options[] = {
{ "sample_rate", "", offsetof(PCMAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 8000}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
- { "channels", "", offsetof(PCMAudioDemuxerContext, channels), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
+#if FF_API_OLD_CHANNEL_LAYOUT
+ { "channels", "", offsetof(PCMAudioDemuxerContext, channels), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_DEPRECATED },
+ { "ch_layout", "", offsetof(PCMAudioDemuxerContext, ch_layout), AV_OPT_TYPE_CHLAYOUT, {.str = NULL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM },
+#else
+ { "ch_layout", "", offsetof(PCMAudioDemuxerContext, ch_layout), AV_OPT_TYPE_CHLAYOUT, {.str = "mono"}, 0, 0, AV_OPT_FLAG_DECODING_PARAM },
+#endif
{ NULL },
};