1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-10-13 04:53:36 -04:00

Set usage flags for each format

This mirrors shout_set_format() behavior for the most part.
This commit is contained in:
Moritz Grimm 2022-08-20 02:56:17 +02:00
parent bee5067209
commit c9426f2373
2 changed files with 15 additions and 4 deletions

7
NEWS
View File

@ -1,3 +1,10 @@
Changes in 1.NNN, released on YYYY-MM-DD:
* Fix regression when streaming formats other than Ogg (e.g. MP3). From
zygmund2000 on Github (#30) and Roland Hermans on GitLab (#2271).
Changes in 1.0.2, released on 2021-02-12:
* Fix a crash, if metadata placeholders are configured for input files

View File

@ -216,7 +216,8 @@ _stream_cfg_stream(struct stream *s, cfg_stream_t cfg_stream)
switch (cfg_stream_get_format(cfg_stream)) {
case CFG_STREAM_OGG:
if (SHOUTERR_SUCCESS !=
shout_set_content_format(s->shout, SHOUT_FORMAT_OGG, 0, NULL)) {
shout_set_content_format(s->shout, SHOUT_FORMAT_OGG,
SHOUT_USAGE_UNKNOWN, NULL)) {
log_error("stream: %s: format: %s: %s",
s->name, cfg_stream_get_format_str(cfg_stream),
shout_get_error(s->shout));
@ -225,7 +226,8 @@ _stream_cfg_stream(struct stream *s, cfg_stream_t cfg_stream)
break;
case CFG_STREAM_MP3:
if (SHOUTERR_SUCCESS !=
shout_set_content_format(s->shout, SHOUT_FORMAT_MP3, 0, NULL)) {
shout_set_content_format(s->shout, SHOUT_FORMAT_MP3,
SHOUT_USAGE_AUDIO, NULL)) {
log_error("stream: %s: format: %s: %s",
s->name, cfg_stream_get_format_str(cfg_stream),
shout_get_error(s->shout));
@ -234,7 +236,8 @@ _stream_cfg_stream(struct stream *s, cfg_stream_t cfg_stream)
break;
case CFG_STREAM_WEBM:
if (SHOUTERR_SUCCESS !=
shout_set_content_format(s->shout, SHOUT_FORMAT_WEBM, 0, NULL)) {
shout_set_content_format(s->shout, SHOUT_FORMAT_WEBM,
SHOUT_USAGE_AUDIO|SHOUT_USAGE_VISUAL, NULL)) {
log_error("stream: %s: format: %s: %s",
s->name, cfg_stream_get_format_str(cfg_stream),
shout_get_error(s->shout));
@ -244,7 +247,8 @@ _stream_cfg_stream(struct stream *s, cfg_stream_t cfg_stream)
#ifdef SHOUT_FORMAT_MATROSKA
case CFG_STREAM_MATROSKA:
if (SHOUTERR_SUCCESS !=
shout_set_content_format(s->shout, SHOUT_FORMAT_MATROSKA, 0, NULL)) {
shout_set_content_format(s->shout, SHOUT_FORMAT_MATROSKA,
SHOUT_USAGE_AUDIO|SHOUT_USAGE_VISUAL, NULL)) {
log_error("stream: %s: format: %s: %s",
s->name, cfg_stream_get_format_str(cfg_stream),
shout_get_error(s->shout));