profile: fix sharing (missing STOP messages)

This commit is contained in:
Jaroslav Kysela 2014-11-25 13:52:41 +01:00
parent fbe1f1f302
commit 3579d04f48
2 changed files with 4 additions and 3 deletions

View 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;

View 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);