HTTP: make sure we don't send (and deref) packets before the mime type etc has been send

This commit is contained in:
John Törnblom 2012-10-25 19:37:34 +02:00
parent 64b2e51c42
commit 174bc64c69

View file

@ -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: