diff --git a/src/transports.c b/src/transports.c index 26262c77..553fb486 100644 --- a/src/transports.c +++ b/src/transports.c @@ -132,19 +132,25 @@ stream_clean(th_stream_t *st) free(st->st_priv); st->st_priv = NULL; - /* Clear reassembly buffer */ + /* Clear reassembly buffers */ + + st->st_startcode = 0; free(st->st_buffer); st->st_buffer = NULL; st->st_buffer_size = 0; st->st_buffer_ptr = 0; - st->st_startcode = 0; free(st->st_buffer2); st->st_buffer2 = NULL; st->st_buffer2_size = 0; st->st_buffer2_ptr = 0; + free(st->st_buffer3); + st->st_buffer3 = NULL; + st->st_buffer3_size = 0; + st->st_buffer3_ptr = 0; + if(st->st_curpkt != NULL) { pkt_ref_dec(st->st_curpkt); diff --git a/src/tvhead.h b/src/tvhead.h index 632203e6..be0f7c15 100644 --- a/src/tvhead.h +++ b/src/tvhead.h @@ -417,6 +417,10 @@ typedef struct th_stream { int st_buffer2_ptr; int st_buffer2_size; + uint8_t *st_buffer3; + int st_buffer3_ptr; + int st_buffer3_size; + uint8_t *st_global_data; int st_global_data_len;