video analysis2.0拆分,ffmpeg封装go接口库
zhangmeng
2019-05-13 3b71fec6bf5e9bc2c03fc397291b515c5f8eead8
fix bug scale
1个文件已修改
5 ■■■■■ 已修改文件
csrc/wrapper.cpp 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
csrc/wrapper.cpp
@@ -84,8 +84,9 @@
                auto dec_ctx = in->getCodecContext();
                if(bridge_)delete bridge_;
                scale_w_ = scale_w_ > dec_ctx->width ? dec_ctx->width : scale_w_;
                scale_h_ = scale_h_ > dec_ctx->height ? dec_ctx->height : scale_h_;
                scale_w_ = scale_w_ == 0 || scale_w_ > dec_ctx->width ? dec_ctx->width : scale_w_;
                scale_h_ = scale_h_ == 0 || scale_h_ > dec_ctx->height ? dec_ctx->height : scale_h_;
                AVPixelFormat pix_fmt = AV_PIX_FMT_BGR24;
                bridge_ = new cvbridge(
                        dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt,