From aeceb4a30f6426dc05e2975a9de9094955069b1a Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 7 Dec 2016 10:46:35 +0100 Subject: [PATCH] iptv: http_client_simple_reconnect() must be protected by the mutex lock, fixes #4119 --- src/input/mpegts/iptv/iptv_http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/input/mpegts/iptv/iptv_http.c b/src/input/mpegts/iptv/iptv_http.c index e05cd45f5..cdb188b9b 100644 --- a/src/input/mpegts/iptv/iptv_http.c +++ b/src/input/mpegts/iptv/iptv_http.c @@ -361,8 +361,10 @@ iptv_http_reconnect ( http_client_t *hc, const char *url ) urlinit(&u); if (!urlparse(url, &u)) { + pthread_mutex_lock(&hc->hc_mutex); hc->hc_keepalive = 0; r = http_client_simple_reconnect(hc, &u, HTTP_VERSION_1_1); + pthread_mutex_unlock(&hc->hc_mutex); if (r < 0) tvherror(LS_IPTV, "cannot reopen http client: %d'", r); } else { -- 2.47.3