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