From 151ffbbc7edffe947b3d716682b7c0ba61ed5316 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 23 Sep 2016 21:36:12 +0200 Subject: [PATCH] Fix a file descriptor leak. --- mux.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mux.cpp b/mux.cpp index 8dd969a..2947cac 100644 --- a/mux.cpp +++ b/mux.cpp @@ -94,8 +94,7 @@ Mux::Mux(AVFormatContext *avctx, int width, int height, Codec video_codec, const Mux::~Mux() { av_write_trailer(avctx); - av_free(avctx->pb->buffer); - av_free(avctx->pb); + avio_closep(&avctx->pb); avformat_free_context(avctx); } -- 2.39.2