subscriptions: fix potential recursion

This commit is contained in:
Adam Sutton 2014-04-21 15:10:22 +01:00
parent 4536719d12
commit ec861d81e8

View file

@ -153,6 +153,7 @@ subscription_unlink_mux(th_subscription_t *s, int reason)
mpegts_input_t *mi = mmi->mmi_input;
pthread_mutex_lock(&mi->mi_output_lock);
s->ths_mmi = NULL;
if (!(s->ths_flags & SUBSCRIPTION_NONE))
streaming_target_disconnect(&mmi->mmi_streaming_pad, &s->ths_input);
@ -162,7 +163,6 @@ subscription_unlink_mux(th_subscription_t *s, int reason)
if (mi && (s->ths_flags & SUBSCRIPTION_FULLMUX))
mi->mi_close_pid(mi, mm, MPEGTS_FULLMUX_PID, MPS_NONE, s);
s->ths_mmi = NULL;
LIST_REMOVE(s, ths_mmi_link);
pthread_mutex_unlock(&mi->mi_output_lock);