| 139 | } |
| 140 | |
| 141 | static 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 | |
| 161 | static void finish_stream(SyncQueue *sq, unsigned int stream_idx) |
| 162 | { |
no test coverage detected