vqavideo: check chunk sizes before reading chunks