Commit aeb8b65c authored by James Almer's avatar James Almer

avformat/flacenc: add a deinit function

Reviewed-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent df57246a
......@@ -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,
};
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