From 5dc3756c8f93158d842c23fe78626b55b09432cf Mon Sep 17 00:00:00 2001 From: cantabile Date: Thu, 4 Apr 2019 14:17:40 +0300 Subject: [PATCH] Free the manually allocated AVFormatContext::pb --- src/FFMPEG.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/FFMPEG.cpp b/src/FFMPEG.cpp index 2c17cc1..4cb4ca6 100644 --- a/src/FFMPEG.cpp +++ b/src/FFMPEG.cpp @@ -194,8 +194,10 @@ void FFMPEG::cleanup() { deinitVideoCodec(); - if (fctx) + if (fctx) { + avio_context_free(&fctx->pb); avformat_close_input(&fctx); + } for (auto it = audio_ctx.begin(); it != audio_ctx.end(); it++) {