Check the return value of fread

This silences warnings on linux/gcc.

Review at https://rbcommons.com/s/OpenH264/r/908/.