Skip to content

Commit

Permalink
Add comment about semaphores
Browse files Browse the repository at this point in the history
  • Loading branch information
colinleroy committed Apr 15, 2024
1 parent ad3754c commit 5a77903
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/surl-server/helpers/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,8 @@ static void *audio_push(void *unused) {
continue;
}
}

/* FIXME I should be able to sem_post */
send_av_sample(audio_data[cur] * AV_MAX_LEVEL/audio_max);
fflush(ttyfp);
cur++;
Expand Down Expand Up @@ -990,6 +992,8 @@ void *video_push(void *unused) {
enqueue_byte(0xFF, ttyfp2); /* Switch page */
flush_changes(ttyfp2);

/* FIXME I should be able to sync with sem_wait() if it weren't
* for unpredicable buffering */
if (sync_fps(&frame_start) || skip_next) {
gettimeofday(&frame_start, 0);
DEBUG("skipping frame\n");
Expand Down

0 comments on commit 5a77903

Please sign in to comment.