mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-29 00:23:23 -05:00
[streaming] validate cfg for supported ffmpeg/mp3 sample_rates
$ fmpeg -h encoder=mp3 ... Supported sample rates: 44100 48000 32000 22050 24000 16000 11025 12000 8000 Supported sample formats: s32p fltp s16p Supported channel layouts: mono stereo
This commit is contained in:
parent
8762891145
commit
7ccd32c354
@ -631,7 +631,7 @@ streaming_init(void)
|
|||||||
cfgsec = cfg_getsec(cfg, "streaming");
|
cfgsec = cfg_getsec(cfg, "streaming");
|
||||||
|
|
||||||
val = cfg_getint(cfgsec, "sample_rate");
|
val = cfg_getint(cfgsec, "sample_rate");
|
||||||
if (val%44100 > 0 && val%48000 > 0)
|
if (val%11025 > 0 && val%12000 > 0 && val%8000)
|
||||||
DPRINTF(E_LOG, L_STREAMING, "non standard streaming sample_rate=%d, defaulting\n", val);
|
DPRINTF(E_LOG, L_STREAMING, "non standard streaming sample_rate=%d, defaulting\n", val);
|
||||||
else
|
else
|
||||||
streaming_quality_out.sample_rate = val;
|
streaming_quality_out.sample_rate = val;
|
||||||
|
Loading…
Reference in New Issue
Block a user