]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
iptv: correction for the previous patch, fixes #5415, issue #5353
authorJaroslav Kysela <perex@perex.cz>
Tue, 11 Dec 2018 08:51:48 +0000 (09:51 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 11 Dec 2018 08:51:48 +0000 (09:51 +0100)
src/input/mpegts/iptv/iptv_http.c

index f31ccd7c98c640c998aa14f8472c58b9f5001fbc..0f42ed6c69b42a490d62677aeeae232c6ae2dbf1 100644 (file)
@@ -195,14 +195,14 @@ iptv_http_kick_cb( void *aux )
   if (im == NULL) return;
   if (hp->flush) {
     hp->flush = 0;
+    tvh_mutex_lock(&iptv_lock);
     if (!hp->started) {
       iptv_input_mux_started(hp->mi, im);
     } else {
-      tvh_mutex_lock(&iptv_lock);
       iptv_input_recv_flush(im);
-      tvh_mutex_unlock(&iptv_lock);
     }
     hp->started = 1;
+    tvh_mutex_unlock(&iptv_lock);
   }
 
   if (hp->unpause) {