Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mpegts table destroy: move the data free calls to the release routine
  • Loading branch information
perexg committed Jul 26, 2014
1 parent 98473cd commit 52e5d7f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/input/mpegts/mpegts_table.c
Expand Up @@ -107,22 +107,23 @@ mpegts_table_dispatch
void
mpegts_table_release_ ( mpegts_table_t *mt )
{
struct mpegts_table_state *st;

while ((st = RB_FIRST(&mt->mt_state))) {
RB_REMOVE(&mt->mt_state, st, link);
free(st);
}
if (mt->mt_destroy)
mt->mt_destroy(mt);
free(mt->mt_name);
free(mt);
}

void
mpegts_table_destroy ( mpegts_table_t *mt )
{
struct mpegts_table_state *st;
mt->mt_destroyed = 1;
mt->mt_mux->mm_close_table(mt->mt_mux, mt);
while ((st = RB_FIRST(&mt->mt_state))) {
RB_REMOVE(&mt->mt_state, st, link);
free(st);
}
if (mt->mt_destroy)
mt->mt_destroy(mt);
mpegts_table_release(mt);
}

Expand Down

0 comments on commit 52e5d7f

Please sign in to comment.