(source ffmpeg) fix index bug + init tables