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>
This commit is contained in:
Michael Niedermayer 2019-10-31 13:32:55 +01:00
parent 5946243fa8
commit 13816a1d08

View 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);