I was trying to play a file that had both AC3 and FLAC audio tracks, as well as subtitles. When playing the FLAC track, the video playback was very glitchy. Some parts played, other parts would freeze the image for maybe 5 seconds, then the scrub bar would flash on the screen and the playback would jump backwards 4 seconds or so (so, looping, but getting a bit farther ahead each loop). This behaviour was not present when I switched to the AC3 audio track.
In the end, I re-encoded the FLAC audio track to AAC and remuxed it into the video, and then it seemed to play correctly.