Initialize sc_fps_counter.interrupted and sc_video_buffer.b.stopped to false explicitly

This commit is contained in:
chengjian.scj 2023-03-02 17:57:13 +08:00
parent b4caa483dd
commit 55617ec39d
2 changed files with 2 additions and 0 deletions

View file

@ -96,6 +96,7 @@ run_fps_counter(void *data) {
bool
sc_fps_counter_start(struct sc_fps_counter *counter) {
sc_mutex_lock(&counter->mutex);
counter->interrupted = false;
counter->next_timestamp = sc_tick_now() + SC_FPS_COUNTER_INTERVAL;
counter->nr_rendered = 0;
counter->nr_skipped = 0;

View file

@ -155,6 +155,7 @@ sc_video_buffer_init(struct sc_video_buffer *vb, sc_tick buffering_time,
sc_clock_init(&vb->b.clock);
sc_queue_init(&vb->b.queue);
vb->b.stopped = false;
}
assert(cbs);