File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
src/core/libraries/avplayer Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -342,16 +342,10 @@ bool AvPlayerSource::GetVideoData(AvPlayerFrameInfoEx& video_info) {
342342
343343 const auto & new_frame = m_video_frames.Front ();
344344 if (m_state.GetSyncMode () == AvPlayerAvSyncMode::Default) {
345- if (m_audio_codec_context != nullptr ) {
346- // Sync with the audio
347- auto avdiff = s64 (new_frame.info .timestamp ) - s64 (m_last_audio_ts.value_or (0 ));
348- if (avdiff > 69 ) {
349- // VIDEO_AHEAD, wait
345+ if (m_audio_stream_index) {
346+ if (new_frame.info .timestamp > m_last_audio_ts.value_or (0 )) {
350347 return false ;
351348 }
352- // These will remain unimplemented for now:
353- // avdiff < -28 = VIDEO_BEHIND, ??? skip frames ???
354- // -2 < avdiff < 0 = WAIT_FOR_SYNC, ??? loop until synced ???
355349 } else {
356350 // Sync with the internal timer since audio is not available
357351 const auto current_time = CurrentTime ();
You can’t perform that action at this time.
0 commit comments