[FFmpeg-cvslog] mxfdec: free descriptor extradata in .read_close()

Janne Grunau git at videolan.org
Mon Feb 10 01:28:04 CET 2014


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Sat Feb  8 12:52:32 2014 +0100| [b37effdc52835e121a0e259e57273a19f9cd61a3] | committer: Janne Grunau

mxfdec: free descriptor extradata in .read_close()

Fixes memleak in fate-mxf-demux.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b37effdc52835e121a0e259e57273a19f9cd61a3
---

 libavformat/mxfdec.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 296044e..158e866 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2200,6 +2200,9 @@ static int mxf_read_close(AVFormatContext *s)
 
     for (i = 0; i < mxf->metadata_sets_count; i++) {
         switch (mxf->metadata_sets[i]->type) {
+        case Descriptor:
+            av_freep(&((MXFDescriptor *)mxf->metadata_sets[i])->extradata);
+            break;
         case MultipleDescriptor:
             av_freep(&((MXFDescriptor *)mxf->metadata_sets[i])->sub_descriptors_refs);
             break;



More information about the ffmpeg-cvslog mailing list