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

Function tb_update

fftools/sync_queue.c:141–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141static void tb_update(const SyncQueue *sq, SyncQueueStream *st,
142 const SyncQueueFrame frame)
143{
144 AVRational tb = (sq->type == SYNC_QUEUE_PACKETS) ?
145 frame.p->time_base : frame.f->time_base;
146
147 av_assert0(tb.num > 0 && tb.den > 0);
148
149 if (tb.num == st->tb.num && tb.den == st->tb.den)
150 return;
151
152 // timebase should not change after the first frame
153 av_assert0(!av_container_fifo_can_read(st->fifo));
154
155 if (st->head_ts != AV_NOPTS_VALUE)
156 st->head_ts = av_rescale_q(st->head_ts, st->tb, tb);
157
158 st->tb = tb;
159}
160
161static void finish_stream(SyncQueue *sq, unsigned int stream_idx)
162{

Callers 1

sq_sendFunction · 0.85

Calls 2

av_rescale_qFunction · 0.85

Tested by

no test coverage detected