X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=video_encoder.cpp;h=2b8fcd5edec9e0a9ea3a79aed79d39d02494375d;hb=817fffe1ef3bd87f2387395f49487cf5255d8daf;hp=2ce5580fec3f456d33a1ed81f5fdf015b3c02ad2;hpb=8d846a0cf80b24e9189389b1d0e126a0a717c86d;p=nageru diff --git a/video_encoder.cpp b/video_encoder.cpp index 2ce5580..2b8fcd5 100644 --- a/video_encoder.cpp +++ b/video_encoder.cpp @@ -34,7 +34,7 @@ string generate_local_dump_filename(int frame) tm now_tm; localtime_r(&now, &now_tm); - char timestamp[256]; + char timestamp[64]; strftime(timestamp, sizeof(timestamp), "%F-%T%z", &now_tm); // Use the frame number to disambiguate between two cuts starting @@ -216,9 +216,9 @@ int VideoEncoder::write_packet2(uint8_t *buf, int buf_size, AVIODataMarkerType t if (type == AVIO_DATA_MARKER_HEADER) { stream_mux_header.append((char *)buf, buf_size); - httpd->set_header(stream_mux_header); + httpd->set_header(HTTPD::MAIN_STREAM, stream_mux_header); } else { - httpd->add_data((char *)buf, buf_size, type == AVIO_DATA_MARKER_SYNC_POINT, time, AVRational{ AV_TIME_BASE, 1 }); + httpd->add_data(HTTPD::MAIN_STREAM, (char *)buf, buf_size, type == AVIO_DATA_MARKER_SYNC_POINT, time, AVRational{ AV_TIME_BASE, 1 }); } return buf_size; }