mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/pcmdec: add support to set channel layout in sln demuxer
Deprecate the channels option, and ensure ch_layout has priority if set over channels, until the latter is gone. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
5cd6cb9f05
commit
e42e54fa4e
@ -180,7 +180,12 @@ PCMDEF(vidc, "PCM Archimedes VIDC", NULL, VIDC)
|
|||||||
#if CONFIG_SLN_DEMUXER
|
#if CONFIG_SLN_DEMUXER
|
||||||
static const AVOption sln_options[] = {
|
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 },
|
{ "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 },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user