Skip to content

Commit

Permalink
face detect fix (#108)
Browse files Browse the repository at this point in the history
Fixes #107; heap corruption and crash happening with ESP 1.0.6 when face detection is enabled.
  • Loading branch information
easytarget authored May 10, 2021
1 parent 0226536 commit f97d56e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions app_httpd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,6 @@ static esp_err_t capture_handler(httpd_req_t *req){
face_id = run_face_recognition(image_matrix, net_boxes);
}
draw_face_boxes(image_matrix, net_boxes, face_id);
free(net_boxes->score);
free(net_boxes->box);
free(net_boxes->landmark);
free(net_boxes);
}

jpg_chunking_t jchunk = {req, 0};
Expand Down Expand Up @@ -513,10 +509,6 @@ static esp_err_t stream_handler(httpd_req_t *req){
}
fr_recognize = esp_timer_get_time();
draw_face_boxes(image_matrix, net_boxes, face_id);
free(net_boxes->score);
free(net_boxes->box);
free(net_boxes->landmark);
free(net_boxes);
}
if(!fmt2jpg(image_matrix->item, fb->width*fb->height*3, fb->width, fb->height, PIXFORMAT_RGB888, 90, &_jpg_buf, &_jpg_buf_len)){
Serial.println("fmt2jpg failed");
Expand Down

0 comments on commit f97d56e

Please sign in to comment.