diff options
author | James Almer <jamrial@gmail.com> | 2019-10-20 23:44:05 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-10-21 17:20:20 -0300 |
commit | aeb8b65cdf3ede71d0c0781585b2f25aaa864a47 (patch) | |
tree | 3a5fcb7d29878c1e2da996ce2134a90e27384317 /libavformat | |
parent | df57246aafea8442bff0a5d39858bbb0c2a1bb51 (diff) | |
download | ffmpeg-aeb8b65cdf3ede71d0c0781585b2f25aaa864a47.tar.gz |
avformat/flacenc: add a deinit function
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/flacenc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c index a07260f426..93cc79bbe0 100644 --- a/libavformat/flacenc.c +++ b/libavformat/flacenc.c @@ -348,11 +348,17 @@ static int flac_write_trailer(struct AVFormatContext *s) av_log(s, AV_LOG_WARNING, "unable to rewrite FLAC header.\n"); } - av_freep(&c->streaminfo); - return 0; } +static void flac_deinit(struct AVFormatContext *s) +{ + FlacMuxerContext *c = s->priv_data; + + ff_packet_list_free(&c->queue, &c->queue_end); + av_freep(&c->streaminfo); +} + static int flac_write_packet(struct AVFormatContext *s, AVPacket *pkt) { FlacMuxerContext *c = s->priv_data; @@ -425,6 +431,7 @@ AVOutputFormat ff_flac_muxer = { .write_header = flac_write_header, .write_packet = flac_write_packet, .write_trailer = flac_write_trailer, + .deinit = flac_deinit, .flags = AVFMT_NOTIMESTAMPS, .priv_class = &flac_muxer_class, }; |