From 81d49a435bc67fa0be45056c743f2a5b46bad264 Mon Sep 17 00:00:00 2001 From: chenshijun <csj_sky@126.com> Date: 星期四, 14 三月 2019 20:05:20 +0800 Subject: [PATCH] 解决ffmpeg打开国标流失败导致段错误的问题 --- QiaoJiaSystem/VideoAnalysFromHC/main.cpp | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/QiaoJiaSystem/VideoAnalysFromHC/main.cpp b/QiaoJiaSystem/VideoAnalysFromHC/main.cpp index c037d6b..e70d72b 100644 --- a/QiaoJiaSystem/VideoAnalysFromHC/main.cpp +++ b/QiaoJiaSystem/VideoAnalysFromHC/main.cpp @@ -77,7 +77,18 @@ DBG("hava GB28181"); #endif - appPref.setLongData("gpu.index", 0); + if (argc < 4) { + assert("t_value.size()"); + } + + int arg1 = atoi(argv[1]); + + int gindx = abs(arg1) % 2; + int GB28181_Enable = arg1 < 0 ? 1 : 0; + DBG(gindx); + appPref.setIntData("GB28181_Enable", GB28181_Enable); + + appPref.setLongData("gpu.index", gindx); appPref.setIntData("show.image", 0); //todo -- Gitblit v1.8.0