From: Jaroslav Kysela Date: Tue, 25 Nov 2014 12:52:41 +0000 (+0100) Subject: profile: fix sharing (missing STOP messages) X-Git-Tag: v4.1~686 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3579d04f48e6d461b2adde1d0fc6ed5e994fddaa;p=thirdparty%2Ftvheadend.git profile: fix sharing (missing STOP messages) --- diff --git a/src/profile.c b/src/profile.c index ac215bdda..e844a9a54 100644 --- a/src/profile.c +++ b/src/profile.c @@ -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; diff --git a/src/subscriptions.c b/src/subscriptions.c index 1b313f8dd..150d4d146 100644 --- a/src/subscriptions.c +++ b/src/subscriptions.c @@ -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);