]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
subscription: fix the wrong raw service removal
authorJaroslav Kysela <perex@perex.cz>
Sun, 18 Oct 2015 19:47:00 +0000 (21:47 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sun, 18 Oct 2015 22:21:33 +0000 (00:21 +0200)
src/service.c
src/subscriptions.c

index 179b1aa0a53fa8b5403761585fd3952b45db0b1f..e58917b97a665bccd12136f4df5feca84b6f3863 100644 (file)
@@ -350,7 +350,7 @@ void
 service_stop(service_t *t)
 {
   elementary_stream_t *st;
+
   gtimer_disarm(&t->s_receive_timer);
 
   t->s_stop_feed(t);
index 627f77b4cd19ddab19a96099a2dc24542645adcc..51365ca671c975678681a4726c0815c45d45c6ef 100644 (file)
@@ -553,13 +553,17 @@ subscription_input(void *opauqe, streaming_message_t *sm)
 void
 subscription_unsubscribe(th_subscription_t *s, int quiet)
 {
-  service_t *t = s->ths_service;
+  service_t *t;
   char buf[512];
   size_t l = 0;
+  service_t *raw;
 
   if (s == NULL)
     return;
 
+  t = s->ths_service;
+  raw = s->ths_raw_service;
+
   lock_assert(&global_lock);
 
   s->ths_state = SUBSCRIPTION_ZOMBIE;
@@ -570,7 +574,7 @@ subscription_unsubscribe(th_subscription_t *s, int quiet)
   LIST_SAFE_REMOVE(s, ths_remove_link);
 
 #if ENABLE_MPEGTS
-  if (s->ths_raw_service)
+  if (raw)
     LIST_REMOVE(s, ths_mux_link);
 #endif
 
@@ -596,7 +600,7 @@ subscription_unsubscribe(th_subscription_t *s, int quiet)
   }
 
 #if ENABLE_MPEGTS
-  if (s->ths_raw_service)
+  if (raw)
     service_remove_raw(s->ths_raw_service);
 #endif