From 174bc64c69dcf6bd87f7b6708fe687f84348785b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rnblom?= Date: Thu, 25 Oct 2012 19:37:34 +0200 Subject: [PATCH] HTTP: make sure we don't send (and deref) packets before the mime type etc has been send --- src/webui/webui.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webui/webui.c b/src/webui/webui.c index 7919f040..35ffce49 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -196,8 +196,10 @@ http_stream_run(http_connection_t *hc, streaming_queue_t *sq, switch(sm->sm_type) { case SMT_MPEGTS: case SMT_PACKET: - muxer_write_pkt(mux, sm->sm_type, sm->sm_data); - sm->sm_data = NULL; + if(started) { + muxer_write_pkt(mux, sm->sm_type, sm->sm_data); + sm->sm_data = NULL; + } break; case SMT_START: