MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / stream_update_ts

Function stream_update_ts

fftools/sync_queue.c:243–265  ·  view source on GitHub ↗

update this stream's head timestamp */

Source from the content-addressed store, hash-verified

241
242/* update this stream's head timestamp */
243static void stream_update_ts(SyncQueue *sq, unsigned int stream_idx, int64_t ts)
244{
245 SyncQueueStream *st = &sq->streams[stream_idx];
246
247 if (ts == AV_NOPTS_VALUE ||
248 (st->head_ts != AV_NOPTS_VALUE && st->head_ts >= ts))
249 return;
250
251 st->head_ts = ts;
252
253 /* if this stream is now ahead of some finished stream, then
254 * this stream is also finished */
255 if (sq->head_finished_stream >= 0 &&
256 av_compare_ts(sq->streams[sq->head_finished_stream].head_ts,
257 sq->streams[sq->head_finished_stream].tb,
258 ts, st->tb) <= 0)
259 finish_stream(sq, stream_idx);
260
261 /* update the overall head timestamp if it could have changed */
262 if (st->limiting &&
263 (sq->head_stream < 0 || sq->head_stream == stream_idx))
264 queue_head_update(sq);
265}
266
267/* If the queue for the given stream (or all streams when stream_idx=-1)
268 * is overflowing, trigger a fake heartbeat on lagging streams.

Callers 2

overflow_heartbeatFunction · 0.85
sq_sendFunction · 0.85

Calls 3

av_compare_tsFunction · 0.85
finish_streamFunction · 0.85
queue_head_updateFunction · 0.85

Tested by

no test coverage detected