]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
profile: fix sharing (missing STOP messages)
authorJaroslav Kysela <perex@perex.cz>
Tue, 25 Nov 2014 12:52:41 +0000 (13:52 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 25 Nov 2014 12:56:45 +0000 (13:56 +0100)
src/profile.c
src/subscriptions.c

index ac215bdda895efb83b04ccc74710004d8c761fbc..e844a9a54bc2ba0aeef2dea0a89cf30fa74cd4cf 100644 (file)
@@ -571,6 +571,9 @@ profile_sharer_input(void *opaque, streaming_message_t *sm)
         profile_sharer_deliver(run, streaming_msg_clone(sm));
       run = prch;
       continue;
+    } else if (sm->sm_type == SMT_STOP) {
+      run = prch;
+      continue;
     }
     if (sm->sm_type != SMT_PACKET && sm->sm_type != SMT_MPEGTS)
       continue;
index 1b313f8ddb49b5e612e65addb38e92ed3527a372..150d4d14631570f935c517f95a63e94670f95a13 100644 (file)
@@ -129,9 +129,7 @@ subscription_unlink_service0(th_subscription_t *s, int reason, int stop)
 
   streaming_target_disconnect(&t->s_streaming_pad, &s->ths_input);
 
-  if(stop &&
-     TAILQ_FIRST(&t->s_filt_components) != NULL && 
-     s->ths_state == SUBSCRIPTION_GOT_SERVICE) {
+  if(stop && t->s_running) {
     // Send a STOP message to the subscription client
     sm = streaming_msg_create_code(SMT_STOP, reason);
     streaming_target_deliver(s->ths_output, sm);