Add size check for decoded frames