mirror of
https://github.com/thinkonmay/sunshine-sdk.git
synced 2026-01-08 21:14:14 +00:00
prepare before update index
This commit is contained in:
parent
3729893340
commit
c8d77a5335
@ -278,10 +278,6 @@ main(int argc, char *argv[]) {
|
||||
std::vector<uint8_t> payload_with_replacements;
|
||||
uint64_t utimestamp = packet->frame_timestamp.value().time_since_epoch().count();
|
||||
|
||||
auto updated = queue->inindex + 1;
|
||||
if (updated >= IN_QUEUE_SIZE)
|
||||
updated = 0;
|
||||
|
||||
if (packet->is_idr() && packet->replacements) {
|
||||
for (auto &replacement : *packet->replacements) {
|
||||
auto frame_old = replacement.old;
|
||||
@ -297,6 +293,10 @@ main(int argc, char *argv[]) {
|
||||
if (packet->after_ref_frame_invalidation)
|
||||
flags |= (1 << 1);
|
||||
|
||||
auto updated = queue->inindex + 1;
|
||||
if (updated >= IN_QUEUE_SIZE)
|
||||
updated = 0;
|
||||
|
||||
queue->incoming[queue->inindex].size = 0;
|
||||
copy_to_packet(&queue->incoming[queue->inindex],&findex,sizeof(uint64_t));
|
||||
copy_to_packet(&queue->incoming[queue->inindex],&utimestamp,sizeof(uint64_t));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user