forgot to parse the format string of audio_output's
git-svn-id: https://svn.musicpd.org/mpd/trunk@3296 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
986a0ffc24
commit
2219e6917e
@ -54,6 +54,7 @@ AudioOutput * newAudioOutput(ConfigParam * param) {
|
|||||||
if(param) {
|
if(param) {
|
||||||
getBlockParam(AUDIO_OUTPUT_NAME, name, 1);
|
getBlockParam(AUDIO_OUTPUT_NAME, name, 1);
|
||||||
getBlockParam(AUDIO_OUTPUT_TYPE, type, 1);
|
getBlockParam(AUDIO_OUTPUT_TYPE, type, 1);
|
||||||
|
getBlockParam(AUDIO_OUTPUT_FORMAT, format, 1);
|
||||||
|
|
||||||
if(!findInList(audioOutputPluginList, type, &data)) {
|
if(!findInList(audioOutputPluginList, type, &data)) {
|
||||||
ERROR("couldn't find audio output plugin for type "
|
ERROR("couldn't find audio output plugin for type "
|
||||||
@ -63,17 +64,6 @@ AudioOutput * newAudioOutput(ConfigParam * param) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugin = (AudioOutputPlugin *) data;
|
plugin = (AudioOutputPlugin *) data;
|
||||||
|
|
||||||
if(format) {
|
|
||||||
ret->convertAudioFormat = 1;
|
|
||||||
|
|
||||||
if(0 != parseAudioConfig(&ret->reqAudioFormat, format))
|
|
||||||
{
|
|
||||||
ERROR("error parsing format at line %i\n",
|
|
||||||
bp->line);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ListNode * node = audioOutputPluginList->firstNode;
|
ListNode * node = audioOutputPluginList->firstNode;
|
||||||
@ -126,6 +116,19 @@ AudioOutput * newAudioOutput(ConfigParam * param) {
|
|||||||
memset(&ret->outAudioFormat, 0, sizeof(AudioFormat));
|
memset(&ret->outAudioFormat, 0, sizeof(AudioFormat));
|
||||||
memset(&ret->reqAudioFormat, 0, sizeof(AudioFormat));
|
memset(&ret->reqAudioFormat, 0, sizeof(AudioFormat));
|
||||||
|
|
||||||
|
if(format) {
|
||||||
|
ret->convertAudioFormat = 1;
|
||||||
|
|
||||||
|
if(0 != parseAudioConfig(&ret->reqAudioFormat, format))
|
||||||
|
{
|
||||||
|
ERROR("error parsing format at line %i\n",
|
||||||
|
bp->line);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
copyAudioFormat(&ret->outAudioFormat, &ret->reqAudioFormat);
|
||||||
|
}
|
||||||
|
|
||||||
if(plugin->initDriverFunc(ret, param) != 0) {
|
if(plugin->initDriverFunc(ret, param) != 0) {
|
||||||
free(ret);
|
free(ret);
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user