diff --git a/channels.c b/channels.c index d59018d6..88a559ce 100644 --- a/channels.c +++ b/channels.c @@ -297,17 +297,15 @@ channels_load(void) TAILQ_INIT(&cl); config_read_file0(buf, &cl); - if((name = config_get_str_sub(&cl, "name", NULL)) == NULL) - continue; - - if((grp = config_get_str_sub(&cl, "channel-group", NULL)) == NULL) - continue; - - tcg = channel_group_find(grp, 1); - ch = channel_find(name, 1, tcg); + name = config_get_str_sub(&cl, "name", NULL); + grp = config_get_str_sub(&cl, "channel-group", NULL); + if(name != NULL && grp != NULL) { + tcg = channel_group_find(grp, 1); + ch = channel_find(name, 1, tcg); - ch->ch_teletext_rundown = - atoi(config_get_str_sub(&cl, "teletext-rundown", "0")); + ch->ch_teletext_rundown = + atoi(config_get_str_sub(&cl, "teletext-rundown", "0")); + } config_free0(&cl); } diff --git a/transports.c b/transports.c index 0a94c262..09b06c6f 100644 --- a/transports.c +++ b/transports.c @@ -95,6 +95,8 @@ transport_stop(th_transport_t *t, int flush_subscriptions) if(st->st_ctx != NULL) avcodec_close(st->st_ctx); + av_free(st->st_ctx); + st->st_parser = NULL; st->st_ctx = NULL; diff --git a/tsmux.c b/tsmux.c index 59543f85..1ef3626b 100644 --- a/tsmux.c +++ b/tsmux.c @@ -714,6 +714,7 @@ ts_muxer_deinit(ts_muxer_t *ts, th_subscription_t *s) while((o = TAILQ_FIRST(&tms->tms_lookahead)) != NULL) { pkt_deref(o->trp_pkt); TAILQ_REMOVE(&tms->tms_lookahead, o, trp_link); + free(o); } }