Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
profile/service: sharer - fix the stop/reconfiguration
  • Loading branch information
perexg committed Nov 2, 2014
1 parent 409b014 commit 723a7ed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/plumbing/tsfix.c
Expand Up @@ -483,4 +483,3 @@ tsfix_destroy(streaming_target_t *pad)
tsfix_destroy_streams(tf);
free(tf);
}

5 changes: 4 additions & 1 deletion src/profile.c
Expand Up @@ -466,8 +466,11 @@ profile_input(void *opaque, streaming_message_t *sm)
profile_chain_t *prch = opaque, *prch2;
profile_sharer_t *prsh = prch->prch_sharer;

if (sm->sm_type == SMT_START)
if (sm->sm_type == SMT_START) {
if (!prsh->prsh_master)
prsh->prsh_master = prch;
prch->prch_stop = 0;
}

if (prch == prsh->prsh_master) {
if (sm->sm_type == SMT_STOP) {
Expand Down
4 changes: 4 additions & 0 deletions src/service.c
Expand Up @@ -1166,6 +1166,10 @@ service_restart(service_t *t, int had_components)
streaming_pad_deliver(&t->s_streaming_pad,
streaming_msg_create_data(SMT_START,
service_build_stream_start(t)));
} else {
streaming_pad_deliver(&t->s_streaming_pad,
streaming_msg_create_code(SMT_STOP,
SM_CODE_NO_SERVICE));
}

pthread_mutex_unlock(&t->s_stream_mutex);
Expand Down

0 comments on commit 723a7ed

Please sign in to comment.