make sure the muxer is closed only when its been initilized.
This commit is contained in:
parent
5b07fa5b35
commit
0d4c30b7da
1 changed files with 6 additions and 1 deletions
|
@ -144,6 +144,7 @@ http_stream_run(http_connection_t *hc, streaming_queue_t *sq,
|
||||||
{
|
{
|
||||||
streaming_message_t *sm;
|
streaming_message_t *sm;
|
||||||
int run = 1;
|
int run = 1;
|
||||||
|
int started = 0;
|
||||||
muxer_t *mux = NULL;
|
muxer_t *mux = NULL;
|
||||||
int timeouts = 0;
|
int timeouts = 0;
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
|
@ -208,10 +209,11 @@ http_stream_run(http_connection_t *hc, streaming_queue_t *sq,
|
||||||
|
|
||||||
http_output_content(hc, muxer_mime(mux, sm->sm_data));
|
http_output_content(hc, muxer_mime(mux, sm->sm_data));
|
||||||
muxer_init(mux, sm->sm_data, name);
|
muxer_init(mux, sm->sm_data, name);
|
||||||
|
|
||||||
|
started = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SMT_STOP:
|
case SMT_STOP:
|
||||||
muxer_close(mux);
|
|
||||||
tvhlog(LOG_WARNING, "webui", "Stop streaming %s, %s", hc->hc_url_orig,
|
tvhlog(LOG_WARNING, "webui", "Stop streaming %s, %s", hc->hc_url_orig,
|
||||||
streaming_code2txt(sm->sm_code));
|
streaming_code2txt(sm->sm_code));
|
||||||
run = 0;
|
run = 0;
|
||||||
|
@ -248,6 +250,9 @@ http_stream_run(http_connection_t *hc, streaming_queue_t *sq,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(started)
|
||||||
|
muxer_close(mux);
|
||||||
|
|
||||||
muxer_destroy(mux);
|
muxer_destroy(mux);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue