Complain about missing default mapping file

This commit is contained in:
Iwan Timmer 2015-09-12 12:52:04 +02:00
parent 036fa5949d
commit af383eb371

View File

@ -317,8 +317,13 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) {
config->stream.bitrate = 5000;
}
if (inputAdded && !mapped) {
fprintf(stderr, "Mapping option should be followed by the input to be mapped.\n");
exit(-1);
if (inputAdded) {
if (!mapped) {
fprintf(stderr, "Mapping option should be followed by the input to be mapped.\n");
exit(-1);
} else if (config->mapping == NULL) {
fprintf(stderr, "Please specify mapping file as default mapping could not be found.\n");
exit(-1);
}
}
}