| 248 | } |
| 249 | |
| 250 | void VideoStream::update(const uint32_t ticks) { |
| 251 | _totalTicks += ticks; |
| 252 | while (_isPlaying) { |
| 253 | if (const auto diff = av_gettime() - _videoTimestamp; diff < _microsPerFrame) |
| 254 | break; |
| 255 | |
| 256 | _videoTimestamp += _microsPerFrame; |
| 257 | while (!processFrame()) { |
| 258 | } |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | void VideoStream::render() const { |
| 263 | if (!_framesReady) |