Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
parsers: fix memory leak for packets when backlog is not enabled
  • Loading branch information
perexg committed Jun 17, 2016
1 parent 894393a commit e73dd22
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/parsers/parsers.c
Expand Up @@ -1274,8 +1274,11 @@ parse_mpeg2video(service_t *t, elementary_stream_t *st, size_t len,
if (!TAILQ_EMPTY(&st->es_backlog))
parser_do_backlog(t, st, NULL, pkt->pkt_meta);
parser_deliver(t, st, pkt);
} else if (config.parser_backlog)
} else if (config.parser_backlog) {
parser_backlog(t, st, pkt);
} else {
pkt_ref_dec(pkt);
}
st->es_curpkt = NULL;

return PARSER_RESET;
Expand Down Expand Up @@ -1366,6 +1369,8 @@ parse_h264_deliver(service_t *t, elementary_stream_t *st, th_pkt_t *pkt)
}
if (config.parser_backlog)
parser_backlog(t, st, pkt);
else
pkt_ref_dec(pkt);
}

static int
Expand Down

0 comments on commit e73dd22

Please sign in to comment.