[FFmpeg-cvslog] r18836 - trunk/libavformat/mxfdec.c
bcoudurier
subversion
Fri May 15 07:33:06 CEST 2009
Author: bcoudurier
Date: Fri May 15 07:33:05 2009
New Revision: 18836
Log:
free Track and unset priv_data to avoid double free, fix memleak
Modified:
trunk/libavformat/mxfdec.c
Modified: trunk/libavformat/mxfdec.c
==============================================================================
--- trunk/libavformat/mxfdec.c Fri May 15 06:44:37 2009 (r18835)
+++ trunk/libavformat/mxfdec.c Fri May 15 07:33:05 2009 (r18836)
@@ -943,6 +943,10 @@ static int mxf_read_close(AVFormatContex
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(AVFormatContex
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;
}
More information about the ffmpeg-cvslog
mailing list