Commit a94e6b50 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Michael Niedermayer

avformat/wavenc: Add deinit function

Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 827bdc84
...@@ -141,7 +141,7 @@ static void bwf_write_bext_chunk(AVFormatContext *s) ...@@ -141,7 +141,7 @@ static void bwf_write_bext_chunk(AVFormatContext *s)
ff_end_tag(s->pb, bext); ff_end_tag(s->pb, bext);
} }
static av_cold void peak_free_buffers(AVFormatContext *s) static av_cold void wav_deinit(AVFormatContext *s)
{ {
WAVMuxContext *wav = s->priv_data; WAVMuxContext *wav = s->priv_data;
...@@ -185,7 +185,6 @@ static av_cold int peak_init_writer(AVFormatContext *s) ...@@ -185,7 +185,6 @@ static av_cold int peak_init_writer(AVFormatContext *s)
nomem: nomem:
av_log(s, AV_LOG_ERROR, "Out of memory\n"); av_log(s, AV_LOG_ERROR, "Out of memory\n");
peak_free_buffers(s);
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
...@@ -485,9 +484,6 @@ static int wav_write_trailer(AVFormatContext *s) ...@@ -485,9 +484,6 @@ static int wav_write_trailer(AVFormatContext *s)
} }
} }
if (wav->write_peak)
peak_free_buffers(s);
return ret; return ret;
} }
...@@ -527,6 +523,7 @@ AVOutputFormat ff_wav_muxer = { ...@@ -527,6 +523,7 @@ AVOutputFormat ff_wav_muxer = {
.write_header = wav_write_header, .write_header = wav_write_header,
.write_packet = wav_write_packet, .write_packet = wav_write_packet,
.write_trailer = wav_write_trailer, .write_trailer = wav_write_trailer,
.deinit = wav_deinit,
.flags = AVFMT_TS_NONSTRICT, .flags = AVFMT_TS_NONSTRICT,
.codec_tag = (const AVCodecTag* const []){ ff_codec_wav_tags, 0 }, .codec_tag = (const AVCodecTag* const []){ ff_codec_wav_tags, 0 },
.priv_class = &wav_muxer_class, .priv_class = &wav_muxer_class,
......
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