subscriptions: add extra debug

This commit is contained in:
Adam Sutton 2013-09-10 23:56:38 +01:00
parent 8e00dc64d9
commit ee03fde53a

View file

@ -72,6 +72,8 @@ subscription_link_service(th_subscription_t *s, service_t *t)
s->ths_service = t;
LIST_INSERT_HEAD(&t->s_subscriptions, s, ths_service_link);
tvhtrace("subscription", "linking sub %p to svc %p", s, t);
pthread_mutex_lock(&t->s_stream_mutex);
if(TAILQ_FIRST(&t->s_components) != NULL) {
@ -86,7 +88,6 @@ subscription_link_service(th_subscription_t *s, service_t *t)
// Link to service output
streaming_target_connect(&t->s_streaming_pad, &s->ths_input);
if(s->ths_start_message != NULL && t->s_streaming_status & TSS_PACKETS) {
s->ths_state = SUBSCRIPTION_GOT_SERVICE;
@ -113,6 +114,8 @@ subscription_unlink_service(th_subscription_t *s, int reason)
streaming_message_t *sm;
service_t *t = s->ths_service;
tvhtrace("subscription", "unlinking sub %p from svc %p", s, t);
pthread_mutex_lock(&t->s_stream_mutex);
// Unlink from service output
@ -363,7 +366,7 @@ subscription_unsubscribe(th_subscription_t *s)
s->ths_title);
}
if(si != NULL)
if(si)
service_remove_subscriber(t, s, SM_CODE_OK);
#if ENABLE_MPEGTS