[FFmpeg-devel] [PATCH 02/17] avformat/wavenc: Add deinit function
James Almer
jamrial at gmail.com
Thu Dec 26 23:41:02 EET 2019
On 12/26/2019 7:53 AM, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
> libavformat/wavenc.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c
> index 159119d693..269793d571 100644
> --- a/libavformat/wavenc.c
> +++ b/libavformat/wavenc.c
> @@ -185,7 +185,6 @@ static av_cold int peak_init_writer(AVFormatContext *s)
>
> nomem:
> av_log(s, AV_LOG_ERROR, "Out of memory\n");
> - peak_free_buffers(s);
> return AVERROR(ENOMEM);
> }
>
> @@ -485,9 +484,6 @@ static int wav_write_trailer(AVFormatContext *s)
> }
> }
>
> - if (wav->write_peak)
> - peak_free_buffers(s);
> -
> return ret;
> }
>
> @@ -527,6 +523,7 @@ AVOutputFormat ff_wav_muxer = {
> .write_header = wav_write_header,
> .write_packet = wav_write_packet,
> .write_trailer = wav_write_trailer,
> + .deinit = peak_free_buffers,
Could also rename it to wav_deinit() while at it.
> .flags = AVFMT_TS_NONSTRICT,
> .codec_tag = (const AVCodecTag* const []){ ff_codec_wav_tags, 0 },
> .priv_class = &wav_muxer_class,
>
More information about the ffmpeg-devel
mailing list