[FFmpeg-devel] [PATCH 5/8] avformat/mxfdec: Clear metadata_sets_count in mxf_read_close()

Michael Niedermayer michael at niedermayer.cc
Thu Oct 31 19:58:27 EET 2019


This avoids problems if the function is called twice

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavformat/mxfdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index f3b1b704f9..68a670154b 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -3582,6 +3582,7 @@ static int mxf_read_close(AVFormatContext *s)
     for (i = 0; i < mxf->metadata_sets_count; i++) {
         mxf_free_metadataset(mxf->metadata_sets + i, 1);
     }
+    mxf->metadata_sets_count = 0;
     av_freep(&mxf->partitions);
     av_freep(&mxf->metadata_sets);
     av_freep(&mxf->aesc);
-- 
2.23.0



More information about the ffmpeg-devel mailing list