diff mbox series

[FFmpeg-devel,2/4] avformat/mxfenc: Don't free priv_data of AVStream

Message ID 20200126102739.26495-2-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/4] avformat/audiointerleave: Check before dereferencing | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 26, 2020, 10:27 a.m. UTC
It will be freed when the AVStream is freed later anyway.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/mxfenc.c | 12 ------------
 1 file changed, 12 deletions(-)

Comments

Michael Niedermayer Jan. 26, 2020, 4:25 p.m. UTC | #1
On Sun, Jan 26, 2020 at 11:27:37AM +0100, Andreas Rheinhardt wrote:
> It will be freed when the AVStream is freed later anyway.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/mxfenc.c | 12 ------------
>  1 file changed, 12 deletions(-)

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 374a83d069..bd3b8bb2d0 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -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;
 }