History

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.

James Almer committed 4 years ago

Commit e42e54f1 parent 5cd6cb91 file · +6 −1Browse files

Unified · Split

libavformat/pcmdec.c+6−1
@@ -180,7 +180,12 @@ PCMDEF(vidc, "PCM Archimedes VIDC", NULL, VIDC) · 179 unmodified lines
180#if CONFIG_SLN_DEMUXER180#if CONFIG_SLN_DEMUXER
181static const AVOption sln_options[] = {181static 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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t