]> git.sesse.net Git - nageru/commitdiff
Fix a file descriptor leak.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 23 Sep 2016 19:36:12 +0000 (21:36 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 23 Sep 2016 19:36:19 +0000 (21:36 +0200)
mux.cpp

diff --git a/mux.cpp b/mux.cpp
index 8dd969a3ec8a95b4a21d21a4e7eae906ce584f6d..2947cac82ab519bdddb22e9bab1862805f80658e 100644 (file)
--- 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);
 }