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