From 3579d04f48e6d461b2adde1d0fc6ed5e994fddaa Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 25 Nov 2014 13:52:41 +0100 Subject: [PATCH] profile: fix sharing (missing STOP messages) --- src/profile.c | 3 +++ src/subscriptions.c | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/profile.c b/src/profile.c index ac215bdd..e844a9a5 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 1b313f8d..150d4d14 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);