diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-06 11:33:31 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-08 18:07:35 +0100 |
commit | a5a99cc11c7aea587c871d6ca3fc80d9f9828e27 (patch) | |
tree | bbd15b46099bd4ce0a436bd33423283c3c926485 /libavformat/amr.c | |
parent | 78a840e7a3b6c4b8d4f665208d4ef4506ef9f5b5 (diff) | |
download | ffmpeg-a5a99cc11c7aea587c871d6ca3fc80d9f9828e27.tar.gz |
avformat/amr: Don't reset AVFormatContext.priv_data
The AMR muxer doesn't have a private context, so it's priv_data
will be NULL. If it weren't, simply setting it to NULL would lead
to a memleak.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/amr.c')
-rw-r--r-- | libavformat/amr.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libavformat/amr.c b/libavformat/amr.c index 9250089cb1..8e14052200 100644 --- a/libavformat/amr.c +++ b/libavformat/amr.c @@ -53,8 +53,6 @@ static int amr_write_header(AVFormatContext *s) AVIOContext *pb = s->pb; AVCodecParameters *par = s->streams[0]->codecpar; - s->priv_data = NULL; - if (par->codec_id == AV_CODEC_ID_AMR_NB) { avio_write(pb, AMR_header, sizeof(AMR_header) - 1); /* magic number */ } else if (par->codec_id == AV_CODEC_ID_AMR_WB) { |