Skip to content

Commit

Permalink
Fix delay before first frame by sending first request boundary before
Browse files Browse the repository at this point in the history
entering the loop.
  • Loading branch information
15498th committed Dec 18, 2021
1 parent 1b836c5 commit 20f4c24
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app_httpd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ static esp_err_t stream_handler(httpd_req_t *req){

httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");

if(res == ESP_OK){
res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));
}

while(true){
fb = esp_camera_fb_get();
if (!fb) {
Expand Down

0 comments on commit 20f4c24

Please sign in to comment.