Skip to content

Commit 193b090

Browse files
authored
Merge pull request #120 from abergmann/ffmpeg_streaming_issue
Move _STREAM_BOUNDARY before _STREAM_PART
2 parents b1c9712 + 3a08226 commit 193b090

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ esp_err_t jpg_stream_httpd_handler(httpd_req_t *req){
212212
_jpg_buf = fb->buf;
213213
}
214214
}
215+
if(res == ESP_OK){
216+
res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));
217+
}
215218
if(res == ESP_OK){
216219
size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len);
217220
@@ -220,9 +223,6 @@ esp_err_t jpg_stream_httpd_handler(httpd_req_t *req){
220223
if(res == ESP_OK){
221224
res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len);
222225
}
223-
if(res == ESP_OK){
224-
res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));
225-
}
226226
if(fb->format != PIXFORMAT_JPEG){
227227
free(_jpg_buf);
228228
}

0 commit comments

Comments
 (0)