1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-11-03 04:17:18 -05:00

Better error messages

This commit is contained in:
Moritz Grimm 2020-01-29 00:36:50 +01:00
parent dca166fd87
commit 031dc752a0

View File

@ -217,24 +217,27 @@ _stream_cfg_stream(struct stream *s, cfg_stream_t cfg_stream)
case CFG_STREAM_OGG:
if (SHOUTERR_SUCCESS !=
shout_set_format(s->shout, SHOUT_FORMAT_OGG)) {
log_error("stream: %s: format_ogg: %s",
s->name, shout_get_error(s->shout));
log_error("stream: %s: format: %s: %s",
s->name, cfg_stream_get_format_str(cfg_stream),
shout_get_error(s->shout));
return (-1);
}
break;
case CFG_STREAM_MP3:
if (SHOUTERR_SUCCESS !=
shout_set_format(s->shout, SHOUT_FORMAT_MP3)) {
log_error("stream: %s: format_mp3: %s",
s->name, shout_get_error(s->shout));
log_error("stream: %s: format: %s: %s",
s->name, cfg_stream_get_format_str(cfg_stream),
shout_get_error(s->shout));
return (-1);
}
break;
case CFG_STREAM_WEBM:
if (SHOUTERR_SUCCESS !=
shout_set_format(s->shout, SHOUT_FORMAT_WEBM)) {
log_error("stream: %s: format_mp3: %s",
s->name, shout_get_error(s->shout));
log_error("stream: %s: format: %s: %s",
s->name, cfg_stream_get_format_str(cfg_stream),
shout_get_error(s->shout));
return (-1);
}
break;
@ -242,14 +245,15 @@ _stream_cfg_stream(struct stream *s, cfg_stream_t cfg_stream)
case CFG_STREAM_MATROSKA:
if (SHOUTERR_SUCCESS !=
shout_set_format(s->shout, SHOUT_FORMAT_MATROSKA)) {
log_error("stream: %s: format_mp3: %s",
s->name, shout_get_error(s->shout));
log_error("stream: %s: format: %s: %s",
s->name, cfg_stream_get_format_str(cfg_stream),
shout_get_error(s->shout));
return (-1);
}
break;
#endif /* SHOUT_FORMAT_MATROSKA */
default:
log_error("stream: %s: format: unsupported: %s",
log_error("stream: %s: format: %s: unsupported",
s->name, cfg_stream_get_format_str(cfg_stream));
return (-1);
}