Mercurial > libavformat.hg
changeset 4940:9bc9feb36557 libavformat
free Track and unset priv_data to avoid double free, fix memleak
author | bcoudurier |
---|---|
date | Fri, 15 May 2009 05:33:05 +0000 |
parents | d10d934600db |
children | 45a08facad6f |
files | mxfdec.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mxfdec.c Fri May 15 04:44:37 2009 +0000 +++ b/mxfdec.c Fri May 15 05:33:05 2009 +0000 @@ -943,6 +943,10 @@ int i; av_freep(&mxf->packages_refs); + + for (i = 0; i < s->nb_streams; i++) + s->streams[i]->priv_data = NULL; + for (i = 0; i < mxf->metadata_sets_count; i++) { switch (mxf->metadata_sets[i]->type) { case MultipleDescriptor: @@ -955,9 +959,6 @@ case MaterialPackage: av_freep(&((MXFPackage *)mxf->metadata_sets[i])->tracks_refs); break; - case Track: - mxf->metadata_sets[i] = NULL; /* will be freed later */ - break; default: break; }