Commit 0048ad7d authored by bcoudurier's avatar bcoudurier

free Track and unset priv_data to avoid double free, fix memleak

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18836 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 37013a6a
......@@ -943,6 +943,10 @@ static int mxf_read_close(AVFormatContext *s)
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 @@ static int mxf_read_close(AVFormatContext *s)
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment