Skip to content
Snippets Groups Projects
Commit 1343b9bf authored by Tobias Reineke's avatar Tobias Reineke Committed by Tim-Philipp Müller
Browse files

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 #848

Part-of: <!1108>
parent ea73a989
No related branches found
No related tags found
1 merge request!1108Backport of "shout2: Add compatibility for libshout >= 2.4.2 shout_open return values" into 1.18
...@@ -567,7 +567,13 @@ gst_shout2send_connect (GstShout2send * sink) ...@@ -567,7 +567,13 @@ gst_shout2send_connect (GstShout2send * sink)
ret = shout_open (sink->conn); ret = shout_open (sink->conn);
/* wait for connection or timeout */ /* 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) { while (ret == SHOUTERR_BUSY) {
#endif
if (gst_util_get_timestamp () - start_ts > sink->timeout * GST_MSECOND) { if (gst_util_get_timestamp () - start_ts > sink->timeout * GST_MSECOND) {
goto connection_timeout; goto connection_timeout;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment