This uses the same hack as Kodi uses, and I suspect MPlayer/ancient mpv also did this (but didn't research that).