mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 19:36:55 +02:00
AvPlayer: preserve clip timestamps across playback loops
This commit is contained in:
@@ -951,7 +951,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
auto now = CurrentTimeNoLock();
|
auto now = CurrentTimeNoLock();
|
||||||
return now == 0 || candidate.info.time_stamp <= now;
|
return now == 0 || candidate.info.time_stamp + candidate.timestamp_offset <= now;
|
||||||
});
|
});
|
||||||
if (!frame) {
|
if (!frame) {
|
||||||
return false;
|
return false;
|
||||||
@@ -996,7 +996,7 @@ public:
|
|||||||
out->details.audio.size = current_audio->info.details.audio.size;
|
out->details.audio.size = current_audio->info.details.audio.size;
|
||||||
std::memcpy(out->details.audio.language_code,
|
std::memcpy(out->details.audio.language_code,
|
||||||
current_audio->info.details.audio.language_code, 4);
|
current_audio->info.details.audio.language_code, 4);
|
||||||
start_time_ms = out->time_stamp;
|
start_time_ms = current_audio->info.time_stamp + current_audio->timestamp_offset;
|
||||||
clock_start = std::chrono::steady_clock::now();
|
clock_start = std::chrono::steady_clock::now();
|
||||||
paused_extra = {};
|
paused_extra = {};
|
||||||
RecordLoopBoundary(*current_audio);
|
RecordLoopBoundary(*current_audio);
|
||||||
@@ -1395,7 +1395,6 @@ private:
|
|||||||
av_frame_free(&frame);
|
av_frame_free(&frame);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ready.info.time_stamp += timestamp_offset;
|
|
||||||
ready.timestamp_offset = timestamp_offset;
|
ready.timestamp_offset = timestamp_offset;
|
||||||
frames.Push(std::move(ready));
|
frames.Push(std::move(ready));
|
||||||
av_frame_free(&frame);
|
av_frame_free(&frame);
|
||||||
|
|||||||
Reference in New Issue
Block a user