video analysis2.0拆分,ffmpeg封装go接口库
zhangmeng
2019-07-22 d42f702ea93b3d34a300ad2f1f72db4d7bb9cc80
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;
         }
      }
   }