mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-08 20:58:41 +00:00
avplayer: remove maximum audio delay (#3692)
This commit is contained in:
committed by
GitHub
parent
0134b8c3a8
commit
1020c3150f
@@ -342,16 +342,10 @@ bool AvPlayerSource::GetVideoData(AvPlayerFrameInfoEx& video_info) {
|
||||
|
||||
const auto& new_frame = m_video_frames.Front();
|
||||
if (m_state.GetSyncMode() == AvPlayerAvSyncMode::Default) {
|
||||
if (m_audio_codec_context != nullptr) {
|
||||
// Sync with the audio
|
||||
auto avdiff = s64(new_frame.info.timestamp) - s64(m_last_audio_ts.value_or(0));
|
||||
if (avdiff > 69) {
|
||||
// VIDEO_AHEAD, wait
|
||||
if (m_audio_stream_index) {
|
||||
if (new_frame.info.timestamp > m_last_audio_ts.value_or(0)) {
|
||||
return false;
|
||||
}
|
||||
// These will remain unimplemented for now:
|
||||
// avdiff < -28 = VIDEO_BEHIND, ??? skip frames ???
|
||||
// -2 < avdiff < 0 = WAIT_FOR_SYNC, ??? loop until synced ???
|
||||
} else {
|
||||
// Sync with the internal timer since audio is not available
|
||||
const auto current_time = CurrentTime();
|
||||
|
||||
Reference in New Issue
Block a user