From 505595cc1e726b2efd8c86af591ecbd46a400af9 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期四, 11 七月 2019 13:24:41 +0800 Subject: [PATCH] remove solid so file path --- csrc/wrapper.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/csrc/wrapper.cpp b/csrc/wrapper.cpp index 7894fa2..321a66a 100644 --- a/csrc/wrapper.cpp +++ b/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, -- Gitblit v1.8.0