Browse Source

add log 3

DevYK 3 years ago
parent
commit
95e80aa0b5
2 changed files with 5 additions and 2 deletions
  1. 1 1
      src/opencv/image_fingerprint.cpp
  2. 4 1
      src/utils/video_similarity.cpp

+ 1 - 1
src/opencv/image_fingerprint.cpp

@@ -100,7 +100,7 @@ int fingerprintFromFFAVFrame(FILE *file, AVFrame *frame, char buf[64]) {
     cv::Mat gray, res;
     if (file) fprintf(file, "fingerprintFromFFAVFrame 3\n");
     printf("fingerprintFromFFAVFrame 3\n");
-    //缩放成8x8大小灰度图
+    //缩放成8x8大小灰度图 todo 会导致 crash 已使用 ffmpeg scale
 //    resize(img, res, Size(scale_width, scale_height));
 //    img.release();
     if (file) fprintf(file, "fingerprintFromFFAVFrame 4\n");

+ 4 - 1
src/utils/video_similarity.cpp

@@ -56,7 +56,6 @@ void sig_crash(int sig) {
             char szLine[512] = {0, };
             sprintf(szLine, "%d %s\n", i, strings[i]);
             fwrite(szLine, 1, strlen(szLine), fd);
-
             std::string symbol(strings[i]);
             size_t pos1 = symbol.find_first_of("[");
             size_t pos2 = symbol.find_last_of("]");
@@ -77,10 +76,14 @@ void sig_crash(int sig) {
     } catch (...) {
         //
     }
+    printf("sig_crash SIG_DFL \n");
     signal(sig, SIG_DFL);
+    printf("sig_crash fflush  \n");
     fflush(fd);
+    printf("sig_crash fclose  \n");
     fclose(fd);
     fd = NULL;
+    printf("sig_crash exit  \n");
 }
 
 long video_similarity_detection_init(const char *url, VideoSimilarity **vs) {