From d42f702ea93b3d34a300ad2f1f72db4d7bb9cc80 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期一, 22 七月 2019 09:58:55 +0800 Subject: [PATCH] update --- csrc/ffmpeg/format/FormatIn.cpp | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/csrc/ffmpeg/format/FormatIn.cpp b/csrc/ffmpeg/format/FormatIn.cpp index 81d6c5f..d61fbc7 100644 --- a/csrc/ffmpeg/format/FormatIn.cpp +++ b/csrc/ffmpeg/format/FormatIn.cpp @@ -39,8 +39,12 @@ FormatIn::~FormatIn() { if(io_ctx_){ - free(read_io_buff_); - avio_close(io_ctx_); + if(read_io_buff_){ + // av_free(read_io_buff_); + read_io_buff_ = NULL; + } + avio_context_free(&io_ctx_); + io_ctx_ = NULL; } if(ctx_){ avformat_close_input(&ctx_); @@ -48,6 +52,7 @@ ctx_ = NULL; if(dec_ctx_){ avcodec_close(dec_ctx_); + dec_ctx_ = NULL; } } } -- Gitblit v1.8.0