From 75b6ea8934e1943b357e67c0d07ea999c8471d9d Mon Sep 17 00:00:00 2001 From: Hu Chunming <2657262686@qq.com> Date: Wed, 6 Aug 2025 11:36:28 +0800 Subject: [PATCH] 完善mq消息发送 --- src/reprocessing_module/save_snapshot_reprocessing.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/reprocessing_module/save_snapshot_reprocessing.cpp b/src/reprocessing_module/save_snapshot_reprocessing.cpp index 94ea282..3b1d1cb 100644 --- a/src/reprocessing_module/save_snapshot_reprocessing.cpp +++ b/src/reprocessing_module/save_snapshot_reprocessing.cpp @@ -102,17 +102,21 @@ void save_snapshot_reprocessing::save_img_process() { waitforsave_img_queue.pop(); waitforsave_img_queue_mutex.unlock(); - bool bSaved = false; + bool bPost = false; if(!cur_image.file_path.empty()){ - bSaved = jpegUtil.jpeg_encode(cur_image.img_info.pic_desc, cur_image.file_path); + bool bSaved = jpegUtil.jpeg_encode(cur_image.img_info.pic_desc, cur_image.file_path); if(!bSaved){ LOG_ERROR("jpeg_encode failed"); + } else { + bPost = true; } + } else { + bPost = true; } VPCUtil::vpc_img_release(cur_image.img_info); #ifdef POST_USE_RABBITMQ - if (bSaved && callback_ != nullptr && cur_image.json_str.length() > 0) { + if (bPost && callback_ != nullptr && cur_image.json_str.length() > 0) { callback_(cur_image.json_str.c_str()); } #endif -- libgit2 0.21.4