From 67e36de699fff8e4d925d6cb818459c7c5c32ab5 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期二, 23 七月 2019 17:30:29 +0800 Subject: [PATCH] update ffmpeg log --- csrc/ffmpeg/format/FormatOut.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/csrc/ffmpeg/format/FormatOut.cpp b/csrc/ffmpeg/format/FormatOut.cpp index 3837dbc..d319969 100644 --- a/csrc/ffmpeg/format/FormatOut.cpp +++ b/csrc/ffmpeg/format/FormatOut.cpp @@ -160,6 +160,9 @@ if(prop.gpuAccl()){ av_opt_set(enc_ctx_->priv_data, "preset", "llhp", 0); int idle_gpu = gpu::getGPU(120); + if (prop.gpu_index_ > -1){ + idle_gpu = prop.gpu_index_; + } if(idle_gpu < 0){ logIt("NO GPU RESOURCE TO ENCODE"); return false; -- Gitblit v1.8.0