| 1426 | } |
| 1427 | |
| 1428 | static double get_clock(Clock *c) |
| 1429 | { |
| 1430 | if (*c->queue_serial != c->serial) |
| 1431 | return NAN; |
| 1432 | if (c->paused) { |
| 1433 | return c->pts; |
| 1434 | } else { |
| 1435 | double time = av_gettime_relative() / 1000000.0; |
| 1436 | return c->pts_drift + time - (time - c->last_updated) * (1.0 - c->speed); |
| 1437 | } |
| 1438 | } |
| 1439 | |
| 1440 | static void set_clock_at(Clock *c, double pts, int serial, double time) |
| 1441 | { |
no test coverage detected