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