|
@@ -393,17 +393,22 @@ int VideoStreamPlaybackWebm::get_mix_rate() const {
|
|
|
|
|
|
inline bool VideoStreamPlaybackWebm::has_enough_video_frames() const {
|
|
inline bool VideoStreamPlaybackWebm::has_enough_video_frames() const {
|
|
if (video_frames_pos > 0) {
|
|
if (video_frames_pos > 0) {
|
|
-
|
|
|
|
- const double audio_delay = AudioServer::get_singleton()->get_output_latency();
|
|
|
|
|
|
+ // FIXME: AudioServer output latency was fixed in af9bb0e, previously it used to
|
|
|
|
+ // systematically return 0. Now that it gives a proper latency, it broke this
|
|
|
|
+ // code where the delay compensation likely never really worked.
|
|
|
|
+ //const double audio_delay = AudioServer::get_singleton()->get_output_latency();
|
|
const double video_time = video_frames[video_frames_pos - 1]->time;
|
|
const double video_time = video_frames[video_frames_pos - 1]->time;
|
|
- return video_time >= time + audio_delay + delay_compensation;
|
|
|
|
|
|
+ return video_time >= time + /* audio_delay + */ delay_compensation;
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
bool VideoStreamPlaybackWebm::should_process(WebMFrame &video_frame) {
|
|
bool VideoStreamPlaybackWebm::should_process(WebMFrame &video_frame) {
|
|
- const double audio_delay = AudioServer::get_singleton()->get_output_latency();
|
|
|
|
- return video_frame.time >= time + audio_delay + delay_compensation;
|
|
|
|
|
|
+ // FIXME: AudioServer output latency was fixed in af9bb0e, previously it used to
|
|
|
|
+ // systematically return 0. Now that it gives a proper latency, it broke this
|
|
|
|
+ // code where the delay compensation likely never really worked.
|
|
|
|
+ //const double audio_delay = AudioServer::get_singleton()->get_output_latency();
|
|
|
|
+ return video_frame.time >= time + /* audio_delay + */ delay_compensation;
|
|
}
|
|
}
|
|
|
|
|
|
void VideoStreamPlaybackWebm::delete_pointers() {
|
|
void VideoStreamPlaybackWebm::delete_pointers() {
|