Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
dvb_psi: add refcounting for bouquet services
  • Loading branch information
perexg committed Jan 5, 2016
1 parent 4e1a96a commit c0779ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/input/mpegts/dvb_psi.c
Expand Up @@ -432,6 +432,7 @@ dvb_bat_find_service( dvb_bat_id_t *bi, mpegts_service_t *s,
if (!bs) {
bs = calloc(1, sizeof(*bs));
bs->svc = s;
service_ref((service_t *)s);
TAILQ_INSERT_TAIL(&bi->services, bs, link);
}
if (lcn != UINT_MAX && !bs->lcn_dtag) {
Expand Down Expand Up @@ -1017,6 +1018,8 @@ dvb_bat_destroy_lists( mpegts_table_t *mt )
while ((bi = LIST_FIRST(&b->bats)) != NULL) {
while ((bs = TAILQ_FIRST(&bi->services)) != NULL) {
TAILQ_REMOVE(&bi->services, bs, link);
if (bs->svc)
service_unref((service_t *)bs->svc);
free(bs);
}
while ((fs = TAILQ_FIRST(&bi->fservices)) != NULL) {
Expand Down

0 comments on commit c0779ca

Please sign in to comment.