Improve clocks support

This commit is contained in:
Kamil Trzcinski
2022-04-06 13:22:49 +02:00
parent 8eb514c6b0
commit 3fe66378aa
8 changed files with 29 additions and 12 deletions

View File

@ -43,7 +43,7 @@ void http_snapshot(http_worker_t *worker, FILE *stream)
{
int counter = 0;
buffer_lock_use(&http_jpeg, 1);
buffer_t *buf = buffer_lock_get(&http_jpeg, 1, &counter);
buffer_t *buf = buffer_lock_get(&http_jpeg, 0, &counter);
if (!buf) {
http_404_header(worker, stream);
@ -68,7 +68,7 @@ void http_stream(http_worker_t *worker, FILE *stream)
buffer_lock_use(&http_jpeg, 1);
while (!feof(stream)) {
buffer_t *buf = buffer_lock_get(&http_jpeg, 3, &counter);
buffer_t *buf = buffer_lock_get(&http_jpeg, 0, &counter);
if (!buf) {
fprintf(stream, STREAM_ERROR, -1, "No frames.");