aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-10-31 13:32:55 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-12-01 17:53:27 +0100
commit0eff731d8d35d4177ea1e817399946bd8f36a686 (patch)
treeb19ab64b60b1a076cb669149f5039e4397356648
parentdb659cdf47892e13b75facfd5407397ddd26c3b7 (diff)
downloadffmpeg-0eff731d8d35d4177ea1e817399946bd8f36a686.tar.gz
avformat/mxfdec: Clear metadata_sets_count in mxf_read_close()
This avoids problems if the function is called twice Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 13816a1d085fdb6598ea6dc92ed3a1e6aff0cc1f) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mxfdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 118e3e40b4..368524e5cf 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -3239,6 +3239,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);