avformat/mxfdec: Clear metadata_sets_count in mxf_read_close()
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 31 Oct 2019 12:32:55 +0000 (13:32 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 1 Dec 2019 16:17:04 +0000 (17:17 +0100)
This avoids problems if the function is called twice

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mxfdec.c

index bcee234..9a48e2d 100644 (file)
@@ -3583,6 +3583,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);