The attached file and source code demonstrates a rare but existing bug in libFLAC somewhere (note I use the libFLAC++ interface, but I assume the problem lies in the libFLAC code).
If you attempt to seek to sample #600000 (out of a total 720000 samples), it fails. I have made many other similar files and can seek to this point in those files... but this file does not work.
Note that the testing it with "flac -t" does not indicate any errors.
This is the result:
$ ./test_seek bad_seek_to_600000.flac
Total samples = 720000
Seeking to 600000
test_seek: regional_sdr/test_seek.cpp:25: void test_decoder::test_seek(): Assertion `seek_ok' failed.
I have tested this with both 1.1.3 and 1.1.4, and both times it has failed.