Mercurial > libavformat.hg
changeset 5738:7152149eb03f libavformat
Plug memory leak in NUT muxer and demuxer
author | vitor |
---|---|
date | Wed, 03 Mar 2010 17:31:24 +0000 |
parents | 192d6ebe32ff |
children | 84bfac703b3a |
files | nut.c nut.h nutdec.c nutenc.c |
diffstat | 4 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/nut.c Wed Mar 03 17:26:00 2010 +0000 +++ b/nut.c Wed Mar 03 17:31:24 2010 +0000 @@ -69,6 +69,17 @@ } } +static void enu_free(void *opaque, void *elem) +{ + av_free(elem); +} + +void ff_nut_free_sp(NUTContext *nut) +{ + av_tree_enumerate(nut->syncpoints, NULL, NULL, enu_free); + av_tree_destroy(nut->syncpoints); +} + const Dispositions ff_nut_dispositions[] = { {"default" , AV_DISPOSITION_DEFAULT}, {"dub" , AV_DISPOSITION_DUB},
--- a/nut.h Wed Mar 03 17:26:00 2010 +0000 +++ b/nut.h Wed Mar 03 17:31:24 2010 +0000 @@ -110,6 +110,7 @@ int ff_nut_sp_pos_cmp(Syncpoint *a, Syncpoint *b); int ff_nut_sp_pts_cmp(Syncpoint *a, Syncpoint *b); void ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts); +void ff_nut_free_sp(NUTContext *nut); extern const Dispositions ff_nut_dispositions[];