You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-30 22:24:04 +02:00
avformat/wavenc: Add deinit function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
827bdc8418
commit
a94e6b50c6
@ -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)
|
|||||||
|
|
||||||
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)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wav->write_peak)
|
|
||||||
peak_free_buffers(s);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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,
|
||||||
|
Reference in New Issue
Block a user