avformat/mxfenc: Don't free priv_data of AVStream
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 26 Jan 2020 10:27:37 +0000 (11:27 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 26 Jan 2020 16:24:41 +0000 (17:24 +0100)
It will be freed when the AVStream is freed later anyway.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mxfenc.c

index 374a83d..bd3b8bb 100644 (file)
@@ -554,16 +554,6 @@ static void mxf_write_metadata_key(AVIOContext *pb, unsigned int value)
     avio_wb24(pb, value);
 }
 
-static void mxf_free(AVFormatContext *s)
-{
-    int i;
-
-    for (i = 0; i < s->nb_streams; i++) {
-        AVStream *st = s->streams[i];
-        av_freep(&st->priv_data);
-    }
-}
-
 static const MXFCodecUL *mxf_get_data_definition_ul(int type)
 {
     const MXFCodecUL *uls = ff_mxf_data_definition_uls;
@@ -3029,8 +3019,6 @@ end:
     av_freep(&mxf->timecode_track->priv_data);
     av_freep(&mxf->timecode_track);
 
-    mxf_free(s);
-
     return err < 0 ? err : 0;
 }