subscription: fix full mux sub hook
I'd added this so that ALL mux subs tried to use fullmux reception. This was clearly not what was intended as the only time this is needed (at present) is when subscribing for muxdump from the webui.
This commit is contained in:
parent
dba191e82b
commit
9ab64b7f47
4 changed files with 8 additions and 5 deletions
|
@ -28,6 +28,7 @@
|
|||
#define MPEGTS_ONID_NONE 0xFFFF
|
||||
#define MPEGTS_TSID_NONE 0xFFFF
|
||||
#define MPEGTS_PSI_SECTION_SIZE 5000
|
||||
#define MPEGTS_FULLMUX_PID 0x2000
|
||||
|
||||
/* Types */
|
||||
typedef struct mpegts_table mpegts_table_t;
|
||||
|
|
|
@ -162,8 +162,8 @@ subscription_unlink_mux(th_subscription_t *s, int reason)
|
|||
sm = streaming_msg_create_code(SMT_STOP, reason);
|
||||
streaming_target_deliver(s->ths_output, sm);
|
||||
|
||||
if (mi)
|
||||
mi->mi_close_pid(mi, mm, 0x2000, MPS_NONE, s);
|
||||
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);
|
||||
|
||||
|
@ -604,9 +604,9 @@ subscription_create_from_mux
|
|||
|
||||
/* Install full mux handler */
|
||||
mi = s->ths_mmi->mmi_input;
|
||||
if (mi) {
|
||||
if (mi && (s->ths_flags & SUBSCRIPTION_FULLMUX)) {
|
||||
pthread_mutex_lock(&mi->mi_delivery_mutex);
|
||||
mi->mi_open_pid(mi, mm, 0x2000, MPS_NONE, s);
|
||||
mi->mi_open_pid(mi, mm, MPEGTS_FULLMUX_PID, MPS_NONE, s);
|
||||
pthread_mutex_unlock(&mi->mi_delivery_mutex);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ extern struct th_subscription_list subscriptions;
|
|||
|
||||
#define SUBSCRIPTION_RAW_MPEGTS 0x1
|
||||
#define SUBSCRIPTION_NONE 0x2
|
||||
#define SUBSCRIPTION_FULLMUX 0x4
|
||||
|
||||
typedef struct th_subscription {
|
||||
|
||||
|
|
|
@ -735,7 +735,8 @@ http_stream_mux(http_connection_t *hc, mpegts_mux_t *mm)
|
|||
|
||||
tcp_get_ip_str((struct sockaddr*)hc->hc_peer, addrbuf, 50);
|
||||
s = subscription_create_from_mux(mm, weight, "HTTP", &sq.sq_st,
|
||||
SUBSCRIPTION_RAW_MPEGTS,
|
||||
SUBSCRIPTION_RAW_MPEGTS |
|
||||
SUBSCRIPTION_FULLMUX,
|
||||
addrbuf, hc->hc_username,
|
||||
http_arg_get(&hc->hc_args, "User-Agent"), NULL);
|
||||
if (!s)
|
||||
|
|
Loading…
Add table
Reference in a new issue