From 9e2f679ae1ddd0f84dd61d892999d8ce66d93c41 Mon Sep 17 00:00:00 2001 From: Tobias Reineke Date: Thu, 18 Nov 2021 16:27:17 +0000 Subject: [PATCH] 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: --- subprojects/gst-plugins-good/ext/shout2/gstshout2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subprojects/gst-plugins-good/ext/shout2/gstshout2.c b/subprojects/gst-plugins-good/ext/shout2/gstshout2.c index 57dfd0a0cc..8e2a59e1e5 100644 --- a/subprojects/gst-plugins-good/ext/shout2/gstshout2.c +++ b/subprojects/gst-plugins-good/ext/shout2/gstshout2.c @@ -576,7 +576,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; }