video analysis2.0拆分,ffmpeg封装go接口库
zhangmeng
2019-10-09 77c5d18916638c54a3866ccb6848cb608b211382
csrc/wrapper.cpp
@@ -437,6 +437,10 @@
    void *CreateConvertor(const int srcW, const int srcH, const int srcFormat,
                          const int dstW, const int dstH, const int flag){
        AVPixelFormat pix_fmt = AV_PIX_FMT_BGR24;
        // just resize
        if (flag == 0){
            pix_fmt = (AVPixelFormat)srcFormat;
        }
        auto bridge = new cvbridge(
                srcW, srcH, srcFormat,
                dstW, dstH, pix_fmt, flag);