Skip to content
  • Rémi Verschelde's avatar
    Workaround WebM playback bug after AudioServer latency fixes · ac63e5d6
    Rémi Verschelde authored
    af9bb0ea fixed AudioServer's
    `get_output_delay()` (which used to always return 0) while renaming it
    to `get_output_latency()`. It now returns the latency from the
    AudioDriver, which can be non-0.
    
    While this was a clear bugfix, it broke playback for WebM files without
    audio track. It seems like the playback code, even though it queried
    the output delay to calculate a time compensation, was designed to work
    even though the delay value was actually bogus. Now that it's correct,
    it's not working.
    
    As a workaround we comment out uses of the output latency, restoring
    the behavior of Godot 3.1.
    
    This code should still be reviewed by someone more versed in video
    playback and fixed to properly account for the non-0 driver latency.
    
    Fixes #35760.
    
    (cherry picked from commit da411d1625a92e4c100bcda2c29709014e261ec9)
    ac63e5d6