|
@@ -13,6 +13,7 @@
|
|
|
const int MAX_STACK_FRAMES = 128;
|
|
|
|
|
|
void sig_crash(int sig) {
|
|
|
+ printf("crash---->sig=%d \n",sig);
|
|
|
FILE *fd;
|
|
|
struct stat buf;
|
|
|
stat("./crash.log", &buf);
|
|
@@ -38,6 +39,7 @@ void sig_crash(int sig) {
|
|
|
now->tm_min,
|
|
|
now->tm_sec,
|
|
|
sig);
|
|
|
+ printf("crash---->%s \n",szLine);
|
|
|
fwrite(szLine, 1, strlen(szLine), fd);
|
|
|
#ifdef __linux
|
|
|
void* array[MAX_STACK_FRAMES];
|
|
@@ -82,8 +84,6 @@ void sig_crash(int sig) {
|
|
|
}
|
|
|
|
|
|
long video_similarity_detection_init(const char *url) {
|
|
|
- signal(SIGABRT, sig_crash);
|
|
|
- signal(SIGSEGV, sig_crash);
|
|
|
auto *ctx = (VideoSimilarityContext *) malloc(sizeof(VideoSimilarityContext));
|
|
|
if (!ctx)return -1;
|
|
|
memset(ctx, 0, sizeof(VideoSimilarityContext));
|
|
@@ -269,7 +269,10 @@ const char *videoSimilarity2json(VideoSimilarity *videoSimilarity) {
|
|
|
* @return
|
|
|
*/
|
|
|
const char *get_video_similarity_list(const char *inputjson) {
|
|
|
+ signal(SIGABRT, sig_crash);
|
|
|
+ signal(SIGSEGV, sig_crash);
|
|
|
if (!inputjson)return NULL;
|
|
|
+ free((void*)inputjson);
|
|
|
printf("get_video_similarity_list=%s \n", inputjson);
|
|
|
auto *vs = json2VideoSimilarity(inputjson);
|
|
|
long id = video_similarity_detection_init(vs->videoPath);
|