mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-09 13:19:00 +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();
|
const auto& new_frame = m_video_frames.Front();
|
||||||
if (m_state.GetSyncMode() == AvPlayerAvSyncMode::Default) {
|
if (m_state.GetSyncMode() == AvPlayerAvSyncMode::Default) {
|
||||||
if (m_audio_codec_context != nullptr) {
|
if (m_audio_stream_index) {
|
||||||
// Sync with the audio
|
if (new_frame.info.timestamp > m_last_audio_ts.value_or(0)) {
|
||||||
auto avdiff = s64(new_frame.info.timestamp) - s64(m_last_audio_ts.value_or(0));
|
|
||||||
if (avdiff > 69) {
|
|
||||||
// VIDEO_AHEAD, wait
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// These will remain unimplemented for now:
|
|
||||||
// avdiff < -28 = VIDEO_BEHIND, ??? skip frames ???
|
|
||||||
// -2 < avdiff < 0 = WAIT_FOR_SYNC, ??? loop until synced ???
|
|
||||||
} else {
|
} else {
|
||||||
// Sync with the internal timer since audio is not available
|
// Sync with the internal timer since audio is not available
|
||||||
const auto current_time = CurrentTime();
|
const auto current_time = CurrentTime();
|
||||||
|
|||||||
Reference in New Issue
Block a user