Fix ESP32 Webcam add boundary marker before sending mjpeg image (#12376)

This commit is contained in:
Theo Arends 2021-06-19 16:40:32 +02:00
parent 37d6548fd2
commit 99d303c191
3 changed files with 7 additions and 1 deletions

View File

@ -9,6 +9,9 @@ All notable changes to this project will be documented in this file.
- Force ESP32 defines USE_UFILESYS, GUI_TRASH_FILE and #define GUI_EDIT_FILE - Force ESP32 defines USE_UFILESYS, GUI_TRASH_FILE and #define GUI_EDIT_FILE
- Speed up initial GUI console refresh - Speed up initial GUI console refresh
### Fixed
- ESP32 Webcam add boundary marker before sending mjpeg image (#12376)
## [Released] ## [Released]
## [9.5.0] 20210617 ## [9.5.0] 20210617

View File

@ -104,6 +104,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
- Speed up initial GUI console refresh - Speed up initial GUI console refresh
### Fixed ### Fixed
- ESP32 Webcam add boundary marker before sending mjpeg image [#12376](https://github.com/arendst/Tasmota/issues/12376)
### Noted ### Noted
- ESP32 single core **tasmota32solo1.bin** binary can only be uploaded using the GUI as OTA upload will trigger the watchdog timer - ESP32 single core **tasmota32solo1.bin** binary can only be uploaded using the GUI as OTA upload will trigger the watchdog timer

View File

@ -791,6 +791,7 @@ void HandleWebcamMjpegTask(void) {
_jpg_buf = wc_fb->buf; _jpg_buf = wc_fb->buf;
} }
Wc.client.print("--" BOUNDARY "\r\n");
Wc.client.printf("Content-Type: image/jpeg\r\n" Wc.client.printf("Content-Type: image/jpeg\r\n"
"Content-Length: %d\r\n" "Content-Length: %d\r\n"
"\r\n", static_cast<int>(_jpg_buf_len)); "\r\n", static_cast<int>(_jpg_buf_len));
@ -801,7 +802,8 @@ void HandleWebcamMjpegTask(void) {
Wc.stream_active=0; Wc.stream_active=0;
AddLog(LOG_LEVEL_DEBUG, PSTR("CAM: Send fail")); AddLog(LOG_LEVEL_DEBUG, PSTR("CAM: Send fail"));
}*/ }*/
Wc.client.print("\r\n--" BOUNDARY "\r\n"); // Wc.client.print("\r\n--" BOUNDARY "\r\n");
Wc.client.print("\r\n");
#ifdef COPYFRAME #ifdef COPYFRAME
if (tmp_picstore.buff) { free(tmp_picstore.buff); } if (tmp_picstore.buff) { free(tmp_picstore.buff); }