From: Steinar H. Gunderson Date: Fri, 23 Sep 2016 19:36:12 +0000 (+0200) Subject: Fix a file descriptor leak. X-Git-Tag: 1.4.0~135 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=151ffbbc7edffe947b3d716682b7c0ba61ed5316;hp=312ed2563ea113dc56960cbfedffd2ca32011a7d;p=nageru Fix a file descriptor leak. --- 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); }