···4747 pthread_mutex_t mutex;
4848 pthread_cond_t cond;
49495050+ //! Timestamp of the last frameset we pushed.
5151+ int64_t last_ts;
5252+5053 //! Should we keep running?
5154 //! currently, true upon startup, false as we're exiting.
5255 bool running;
···137140 frames[0]->timestamp = ts;
138141 frames[1]->timestamp = ts;
139142140140- // Send to the consumer, in left-right order.
141141- xrt_sink_push_frame(q->consumer_left, frames[0]);
142142- xrt_sink_push_frame(q->consumer_right, frames[1]);
143143-143143+ if (ts == q->last_ts) {
144144+ U_LOG_W("Got an image frame with a duplicate timestamp! Old: %lu; New: %lu", q->last_ts, ts);
145145+ } else if (ts < q->last_ts) {
146146+ U_LOG_W("Got an image frame with a non-monotonically-increasing timestamp! Old: %lu; New: %lu",
147147+ q->last_ts, ts);
148148+ } else {
149149+ // Send to the consumer, in left-right order.
150150+ xrt_sink_push_frame(q->consumer_left, frames[0]);
151151+ xrt_sink_push_frame(q->consumer_right, frames[1]);
152152+ }
144153 /*
145154 * Drop our reference - we don't need it anymore. If the consumer wants to keep it, they will have
146155 * referenced it in their push_frame handler.