Commit 7797fdfe authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by James Almer

avformat/matroskaenc: Use ffio_free_dyn_buf

instead of replicating its behaviour.
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 982a98a0
...@@ -391,23 +391,12 @@ static void put_xiph_size(AVIOContext *pb, int size) ...@@ -391,23 +391,12 @@ static void put_xiph_size(AVIOContext *pb, int size)
static void mkv_deinit(AVFormatContext *s) static void mkv_deinit(AVFormatContext *s)
{ {
MatroskaMuxContext *mkv = s->priv_data; MatroskaMuxContext *mkv = s->priv_data;
uint8_t* buf;
if (mkv->cluster_bc) { ffio_free_dyn_buf(&mkv->cluster_bc);
avio_close_dyn_buf(mkv->cluster_bc, &buf); ffio_free_dyn_buf(&mkv->info_bc);
av_free(buf); ffio_free_dyn_buf(&mkv->tracks_bc);
} ffio_free_dyn_buf(&mkv->tags_bc);
if (mkv->info_bc) {
avio_close_dyn_buf(mkv->info_bc, &buf);
av_free(buf);
}
if (mkv->tracks_bc) {
avio_close_dyn_buf(mkv->tracks_bc, &buf);
av_free(buf);
}
if (mkv->tags_bc) {
avio_close_dyn_buf(mkv->tags_bc, &buf);
av_free(buf);
}
if (mkv->seekhead) { if (mkv->seekhead) {
av_freep(&mkv->seekhead->entries); av_freep(&mkv->seekhead->entries);
av_freep(&mkv->seekhead); av_freep(&mkv->seekhead);
......
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