Commit 3266d055 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mxfdec: Clear metadata_sets_count in mxf_read_close()

This avoids problems if the function is called twice
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 13816a1d)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent b02b306f
...@@ -3581,6 +3581,7 @@ static int mxf_read_close(AVFormatContext *s) ...@@ -3581,6 +3581,7 @@ static int mxf_read_close(AVFormatContext *s)
for (i = 0; i < mxf->metadata_sets_count; i++) { for (i = 0; i < mxf->metadata_sets_count; i++) {
mxf_free_metadataset(mxf->metadata_sets + i, 1); mxf_free_metadataset(mxf->metadata_sets + i, 1);
} }
mxf->metadata_sets_count = 0;
av_freep(&mxf->partitions); av_freep(&mxf->partitions);
av_freep(&mxf->metadata_sets); av_freep(&mxf->metadata_sets);
av_freep(&mxf->aesc); av_freep(&mxf->aesc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment