Deprecate the channels option, and ensure ch_layout has priority if set over channels, until the latter is gone.
Unified · Split
| @@ -180,7 +180,12 @@ PCMDEF(vidc, "PCM Archimedes VIDC", NULL, VIDC) · 179 unmodified lines | |||
| 180 | #if CONFIG_SLN_DEMUXER | 180 | #if CONFIG_SLN_DEMUXER |
| 181 | static const AVOption sln_options[] = { | 181 | static const AVOption sln_options[] = { |
| 182 | { "sample_rate", "", offsetof(PCMAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 8000}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, | 182 | { "sample_rate", "", offsetof(PCMAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 8000}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, |
| 183 | { "channels", "", offsetof(PCMAudioDemuxerContext, channels), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, | 183 | #if FF_API_OLD_CHANNEL_LAYOUT |
| 184 | { "channels", "", offsetof(PCMAudioDemuxerContext, channels), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_DEPRECATED }, | ||
| 185 | { "ch_layout", "", offsetof(PCMAudioDemuxerContext, ch_layout), AV_OPT_TYPE_CHLAYOUT, {.str = NULL}, 0, 0, AV_OPT_FLAG_DECODING_PARAM }, | ||
| 186 | #else | ||
| 187 | { "ch_layout", "", offsetof(PCMAudioDemuxerContext, ch_layout), AV_OPT_TYPE_CHLAYOUT, {.str = "mono"}, 0, 0, AV_OPT_FLAG_DECODING_PARAM }, | ||
| 188 | #endif | ||
| 184 | { NULL }, | 189 | { NULL }, |
| 185 | }; | 190 | }; |
| 186 | 191 | ||