diff options
author | Tobias Reineke <tobi@g3th.net> | 2021-11-18 16:27:17 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2021-11-20 20:32:30 +0000 |
commit | 1343b9bff8fbd3d4b5da1833830239ce9782afc3 (patch) | |
tree | 157a28bb033e8f07a65a36872a884acec529cbbf | |
parent | ea73a9899141b4951eab5037a886e756b23533e4 (diff) | |
download | gstreamer-plugins-good-1343b9bff8fbd3d4b5da1833830239ce9782afc3.tar.gz |
shout2: Add compatibility for libshout >= 2.4.2
In libshout >=2.4.2 shout_open() can return SHOUTERR_RETRY in addition
to SHOUTERR_BUSY.
The nonblocking example in libshout fixes the problem in a similar
way, as mentioned by the author in this issue:
https://gitlab.xiph.org/xiph/icecast-libshout/-/issues/2316
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/848
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1108>
-rw-r--r-- | ext/shout2/gstshout2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/shout2/gstshout2.c b/ext/shout2/gstshout2.c index b301bc8b3..955897926 100644 --- a/ext/shout2/gstshout2.c +++ b/ext/shout2/gstshout2.c @@ -567,7 +567,13 @@ gst_shout2send_connect (GstShout2send * sink) ret = shout_open (sink->conn); /* wait for connection or timeout */ +#ifdef SHOUTERR_RETRY + /* starting with libshout 2.4.2, shout_open() has broken API + ABI and + * can also return SHOUTERR_RETRY (a new define) to mean "try again" */ + while (ret == SHOUTERR_BUSY || ret == SHOUTERR_RETRY) { +#else while (ret == SHOUTERR_BUSY) { +#endif if (gst_util_get_timestamp () - start_ts > sink->timeout * GST_MSECOND) { goto connection_timeout; } |